Update to Minecraft 1.17

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-11 15:00:00 +10:00
parent 75faba7fde
commit b3a8254758
619 changed files with 10708 additions and 8451 deletions

View File

@@ -14,18 +14,18 @@
+
public class BlockSweetBerryBush extends BlockPlant implements IBlockFragilePlantElement {
public static final BlockStateInteger a = BlockProperties.ag;
@@ -52,7 +60,7 @@
int i = (Integer) iblockdata.get(BlockSweetBerryBush.a);
private static final float HURT_SPEED_THRESHOLD = 0.003F;
@@ -59,7 +67,7 @@
int i = (Integer) iblockdata.get(BlockSweetBerryBush.AGE);
if (i < 3 && random.nextInt(5) == 0 && worldserver.getLightLevel(blockposition.up(), 0) >= 9) {
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.a, i + 1), 2);
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.a, i + 1), 2); // CraftBukkit
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.AGE, i + 1), 2);
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.AGE, i + 1), 2); // CraftBukkit
}
}
@@ -66,7 +74,9 @@
double d1 = Math.abs(entity.locZ() - entity.F);
@@ -73,7 +81,9 @@
double d1 = Math.abs(entity.locZ() - entity.zOld);
if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) {
+ CraftEventFactory.blockDamage = CraftBlock.at(world, blockposition); // CraftBukkit
@@ -34,7 +34,7 @@
}
}
@@ -83,7 +93,15 @@
@@ -90,7 +100,15 @@
} else if (i > 1) {
int j = 1 + world.random.nextInt(2);
@@ -48,6 +48,6 @@
+ a(world, blockposition, CraftItemStack.asNMSCopy(itemStack));
+ }
+ // CraftBukkit end
world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_SWEET_BERRIES_PICK_FROM_BUSH, SoundCategory.BLOCKS, 1.0F, 0.8F + world.random.nextFloat() * 0.4F);
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.a, 1), 2);
world.playSound((EntityHuman) null, blockposition, SoundEffects.SWEET_BERRY_BUSH_PICK_BERRIES, SoundCategory.BLOCKS, 1.0F, 0.8F + world.random.nextFloat() * 0.4F);
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.AGE, 1), 2);
return EnumInteractionResult.a(world.isClientSide);