aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/entity/animal/EntityTurtle.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/world/entity/animal/EntityTurtle.patch')
-rw-r--r--patch-remap/og/net/minecraft/world/entity/animal/EntityTurtle.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/entity/animal/EntityTurtle.patch b/patch-remap/og/net/minecraft/world/entity/animal/EntityTurtle.patch
new file mode 100644
index 0000000000..9125bf6969
--- /dev/null
+++ b/patch-remap/og/net/minecraft/world/entity/animal/EntityTurtle.patch
@@ -0,0 +1,37 @@
+--- a/net/minecraft/world/entity/animal/EntityTurtle.java
++++ b/net/minecraft/world/entity/animal/EntityTurtle.java
+@@ -307,7 +307,9 @@
+ protected void ageBoundaryReached() {
+ super.ageBoundaryReached();
+ if (!this.isBaby() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
++ this.forceDrops = true; // CraftBukkit
+ this.spawnAtLocation(Items.SCUTE, 1);
++ this.forceDrops = false; // CraftBukkit
+ }
+
+ }
+@@ -334,7 +336,9 @@
+
+ @Override
+ public void thunderHit(WorldServer worldserver, EntityLightning entitylightning) {
++ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = entitylightning; // CraftBukkit
+ this.hurt(this.damageSources().lightningBolt(), Float.MAX_VALUE);
++ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = null; // CraftBukkit
+ }
+
+ @Override
+@@ -491,12 +495,14 @@
+ } else if (this.turtle.layEggCounter > this.adjustedTickDelay(200)) {
+ World world = this.turtle.level();
+
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), (IBlockData) Blocks.TURTLE_EGG.defaultBlockState().setValue(BlockTurtleEgg.EGGS, this.turtle.random.nextInt(4) + 1))) { // CraftBukkit
+ world.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_LAY_EGG, SoundCategory.BLOCKS, 0.3F, 0.9F + world.random.nextFloat() * 0.2F);
+ BlockPosition blockposition1 = this.blockPos.above();
+ IBlockData iblockdata = (IBlockData) Blocks.TURTLE_EGG.defaultBlockState().setValue(BlockTurtleEgg.EGGS, this.turtle.random.nextInt(4) + 1);
+
+ world.setBlock(blockposition1, iblockdata, 3);
+ world.gameEvent(GameEvent.BLOCK_PLACE, blockposition1, GameEvent.a.of(this.turtle, iblockdata));
++ } // CraftBukkit
+ this.turtle.setHasEgg(false);
+ this.turtle.setLayingEgg(false);
+ this.turtle.setInLoveTime(600);