Add xp orb spawn reason for frogs (#8045)
This commit is contained in:
@@ -67,6 +67,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ nbttagcompound.put("Paper.ExpData", comp);
|
+ nbttagcompound.put("Paper.ExpData", comp);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
|
+ @io.papermc.paper.annotation.DoNotUse
|
||||||
|
+ @Deprecated
|
||||||
public ExperienceOrb(Level world, double x, double y, double z, int amount) {
|
public ExperienceOrb(Level world, double x, double y, double z, int amount) {
|
||||||
+ this(world, x, y, z, amount, null, null);
|
+ this(world, x, y, z, amount, null, null);
|
||||||
+ }
|
+ }
|
||||||
@@ -180,6 +182,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), randomsource.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper;
|
+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), randomsource.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
|
@@ -0,0 +0,0 @@ public class Frog extends Animal {
|
||||||
|
this.getBrain().setMemory(MemoryModuleType.IS_PREGNANT, Unit.INSTANCE);
|
||||||
|
world.broadcastEntityEvent(this, (byte)18);
|
||||||
|
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||||
|
- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1));
|
||||||
|
+ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, serverPlayer)); // Paper
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
|||||||
@@ -192,6 +192,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
return instance.group(RecordCodecBuilder.point(updateListener), Codec.BOOL.optionalFieldOf("Valid", Boolean.valueOf(false)).forGetter((poiSet) -> {
|
return instance.group(RecordCodecBuilder.point(updateListener), Codec.BOOL.optionalFieldOf("Valid", Boolean.valueOf(false)).forGetter((poiSet) -> {
|
||||||
return poiSet.isValid;
|
return poiSet.isValid;
|
||||||
}), PoiRecord.codec(updateListener).listOf().fieldOf("Records").forGetter((poiSet) -> {
|
}), PoiRecord.codec(updateListener).listOf().fieldOf("Records").forGetter((poiSet) -> {
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
|
@@ -0,0 +0,0 @@ public class Frog extends Animal {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Brain<Frog> getBrain() {
|
||||||
|
- return super.getBrain();
|
||||||
|
+ return (Brain<Frog>) super.getBrain(); // Paper - decompile fix
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||||
|
|||||||
Reference in New Issue
Block a user