Update to Minecraft 1.19

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-06-08 02:00:00 +10:00
parent 91d9aa9a89
commit 25f3b50f6b
332 changed files with 3628 additions and 2559 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/BlockTurtleEgg.java
+++ b/net/minecraft/world/level/block/BlockTurtleEgg.java
@@ -28,6 +28,12 @@
@@ -29,6 +29,12 @@
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
@@ -13,7 +13,7 @@
public class BlockTurtleEgg extends Block {
public static final int MAX_HATCH_LEVEL = 2;
@@ -61,6 +67,19 @@
@@ -65,6 +71,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);
}
@@ -86,9 +105,19 @@
@@ -91,9 +110,19 @@
int i = (Integer) iblockdata.getValue(BlockTurtleEgg.HATCH);
if (i < 2) {
@@ -42,7 +42,7 @@
+ return;
+ }
+ // CraftBukkit end
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_EGG_CRACK, SoundCategory.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_EGG_CRACK, SoundCategory.BLOCKS, 0.7F, 0.9F + randomsource.nextFloat() * 0.2F);
- worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockTurtleEgg.HATCH, i + 1), 2);
+ // worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockTurtleEgg.HATCH, i + 1), 2); // CraftBukkit - handled above
} else {
@@ -51,10 +51,10 @@
+ return;
+ }
+ // CraftBukkit end
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_EGG_HATCH, SoundCategory.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_EGG_HATCH, SoundCategory.BLOCKS, 0.7F, 0.9F + randomsource.nextFloat() * 0.2F);
worldserver.removeBlock(blockposition, false);
@@ -99,7 +128,7 @@
@@ -104,7 +133,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);