mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-31 04:13:51 -07:00
@@ -1,35 +1,44 @@
|
||||
--- a/net/minecraft/server/EntityTurtle.java
|
||||
+++ b/net/minecraft/server/EntityTurtle.java
|
||||
@@ -232,7 +232,9 @@
|
||||
@@ -258,7 +258,9 @@
|
||||
protected void l() {
|
||||
super.l();
|
||||
if (this.world.getGameRules().getBoolean("doMobLoot")) {
|
||||
if (!this.isBaby() && this.world.getGameRules().getBoolean("doMobLoot")) {
|
||||
+ this.forceDrops = true; // CraftBukkit
|
||||
this.a((IMaterial) Items.SCUTE, 1);
|
||||
+ this.forceDrops = false; // CraftBukkit
|
||||
}
|
||||
|
||||
}
|
||||
@@ -263,7 +265,9 @@
|
||||
}
|
||||
@@ -285,7 +287,9 @@
|
||||
|
||||
@Override
|
||||
public void onLightningStrike(EntityLightning entitylightning) {
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = entitylightning; // CraftBukkit
|
||||
this.damageEntity(DamageSource.LIGHTNING, Float.MAX_VALUE);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = null; // CraftBukkit
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
@@ -423,8 +427,12 @@
|
||||
} else if (this.f.bK > 200) {
|
||||
World world = this.f.world;
|
||||
static class g extends NavigationGuardian {
|
||||
@@ -445,8 +449,12 @@
|
||||
} else if (this.g.bH > 200) {
|
||||
World world = this.g.world;
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.f, this.d.up(), Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, Integer.valueOf(this.f.random.nextInt(4) + 1))).isCancelled()) {
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.g, this.e.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, this.g.random.nextInt(4) + 1)).isCancelled()) {
|
||||
world.a((EntityHuman) null, blockposition, SoundEffects.ENTITY_TURTLE_LAY_EGG, SoundCategory.BLOCKS, 0.3F, 0.9F + world.random.nextFloat() * 0.2F);
|
||||
world.setTypeAndData(this.d.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, this.f.random.nextInt(4) + 1), 3);
|
||||
world.setTypeAndData(this.e.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, this.g.random.nextInt(4) + 1), 3);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.f.s(false);
|
||||
this.f.t(false);
|
||||
this.f.d(600);
|
||||
this.g.r(false);
|
||||
this.g.s(false);
|
||||
this.g.setLoveTicks(600);
|
||||
@@ -532,7 +540,7 @@
|
||||
--this.e;
|
||||
return false;
|
||||
} else {
|
||||
- this.d = this.b.world.a(EntityTurtle.i.a, (EntityLiving) this.b);
|
||||
+ this.d = this.b.world.a(this.a, (EntityLiving) this.b); // CraftBukkit - decompile error
|
||||
return this.d == null ? false : this.a(this.d.getItemInMainHand()) || this.a(this.d.getItemInOffHand());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user