2018-07-21 06:55:07 +02:00
|
|
|
--- a/net/minecraft/server/EntityTurtle.java
|
|
|
|
+++ b/net/minecraft/server/EntityTurtle.java
|
2018-08-26 04:00:00 +02:00
|
|
|
@@ -232,7 +232,9 @@
|
2018-07-24 14:22:56 +02:00
|
|
|
protected void l() {
|
|
|
|
super.l();
|
2018-08-26 04:00:00 +02:00
|
|
|
if (this.world.getGameRules().getBoolean("doMobLoot")) {
|
|
|
|
+ this.forceDrops = true; // CraftBukkit
|
|
|
|
this.a((IMaterial) Items.SCUTE, 1);
|
|
|
|
+ this.forceDrops = false; // CraftBukkit
|
|
|
|
}
|
2018-07-24 14:22:56 +02:00
|
|
|
|
2018-08-26 04:00:00 +02:00
|
|
|
}
|
|
|
|
@@ -263,7 +265,9 @@
|
2018-07-21 06:55:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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) {
|
2018-10-22 21:00:00 +02:00
|
|
|
@@ -435,8 +439,12 @@
|
2018-08-16 12:27:16 +02:00
|
|
|
} else if (this.f.bK > 200) {
|
|
|
|
World world = this.f.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()) {
|
|
|
|
world.a((EntityHuman) null, blockposition, SoundEffects.ENTITY_TURTLE_LAY_EGG, SoundCategory.BLOCKS, 0.3F, 0.9F + world.random.nextFloat() * 0.2F);
|
2018-08-16 12:48:00 +02:00
|
|
|
world.setTypeAndData(this.d.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, Integer.valueOf(this.f.random.nextInt(4) + 1)), 3);
|
2018-08-16 12:27:16 +02:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
this.f.s(false);
|
|
|
|
this.f.t(false);
|
2018-08-26 04:00:00 +02:00
|
|
|
this.f.d(600);
|