geforkt von Mirrors/Paper
45 Zeilen
2.1 KiB
Diff
45 Zeilen
2.1 KiB
Diff
--- a/net/minecraft/server/EntityTurtle.java
|
|
+++ b/net/minecraft/server/EntityTurtle.java
|
|
@@ -254,7 +254,9 @@
|
|
protected void l() {
|
|
super.l();
|
|
if (!this.isBaby() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
|
|
+ this.forceDrops = true; // CraftBukkit
|
|
this.a((IMaterial) Items.SCUTE, 1);
|
|
+ this.forceDrops = false; // CraftBukkit
|
|
}
|
|
|
|
}
|
|
@@ -281,7 +283,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
|
|
}
|
|
|
|
static class g extends NavigationGuardian {
|
|
@@ -441,8 +445,12 @@
|
|
} else if (this.g.bG > 200) {
|
|
World world = this.g.world;
|
|
|
|
+ // CraftBukkit start
|
|
+ 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.e.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, this.g.random.nextInt(4) + 1), 3);
|
|
+ }
|
|
+ // CraftBukkit end
|
|
this.g.r(false);
|
|
this.g.s(false);
|
|
this.g.setLoveTicks(600);
|
|
@@ -528,7 +536,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());
|
|
}
|
|
}
|