@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockTurtleEgg.java
|
||||
+++ b/net/minecraft/world/level/block/BlockTurtleEgg.java
|
||||
@@ -29,6 +29,12 @@
|
||||
@@ -30,6 +30,12 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
+
|
||||
public class BlockTurtleEgg extends Block {
|
||||
|
||||
public static final int MAX_HATCH_LEVEL = 2;
|
||||
@@ -65,6 +71,19 @@
|
||||
public static final MapCodec<BlockTurtleEgg> CODEC = simpleCodec(BlockTurtleEgg::new);
|
||||
@@ -72,6 +78,19 @@
|
||||
private void destroyEgg(World world, IBlockData iblockdata, BlockPosition blockposition, Entity entity, int i) {
|
||||
if (this.canDestroyEgg(world, entity)) {
|
||||
if (!world.isClientSide && world.random.nextInt(i) == 0 && iblockdata.is(Blocks.TURTLE_EGG)) {
|
||||
@@ -33,7 +33,7 @@
|
||||
this.decreaseEggs(world, blockposition, iblockdata);
|
||||
}
|
||||
|
||||
@@ -91,10 +110,20 @@
|
||||
@@ -98,10 +117,20 @@
|
||||
int i = (Integer) iblockdata.getValue(BlockTurtleEgg.HATCH);
|
||||
|
||||
if (i < 2) {
|
||||
@@ -55,7 +55,7 @@
|
||||
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_EGG_HATCH, SoundCategory.BLOCKS, 0.7F, 0.9F + randomsource.nextFloat() * 0.2F);
|
||||
worldserver.removeBlock(blockposition, false);
|
||||
worldserver.gameEvent(GameEvent.BLOCK_DESTROY, blockposition, GameEvent.a.of(iblockdata));
|
||||
@@ -107,7 +136,7 @@
|
||||
@@ -114,7 +143,7 @@
|
||||
entityturtle.setAge(-24000);
|
||||
entityturtle.setHomePos(blockposition);
|
||||
entityturtle.moveTo((double) blockposition.getX() + 0.3D + (double) j * 0.2D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.3D, 0.0F, 0.0F);
|
||||
|
||||
Reference in New Issue
Block a user