mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-18 22:03:51 -07:00
Update to Minecraft 1.16.1
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
+
|
||||
public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
|
||||
|
||||
public static final BlockStateInteger AGE = BlockProperties.ac;
|
||||
@@ -35,14 +37,18 @@
|
||||
public static final BlockStateInteger AGE = BlockProperties.ai;
|
||||
@@ -34,14 +36,18 @@
|
||||
|
||||
if (i < 7) {
|
||||
iblockdata = (IBlockData) iblockdata.set(BlockStem.AGE, i + 1);
|
||||
@@ -18,9 +18,9 @@
|
||||
} else {
|
||||
EnumDirection enumdirection = EnumDirection.EnumDirectionLimit.HORIZONTAL.a(random);
|
||||
BlockPosition blockposition1 = blockposition.shift(enumdirection);
|
||||
Block block = worldserver.getType(blockposition1.down()).getBlock();
|
||||
IBlockData iblockdata1 = worldserver.getType(blockposition1.down());
|
||||
|
||||
if (worldserver.getType(blockposition1).isAir() && (block == Blocks.FARMLAND || block == Blocks.DIRT || block == Blocks.COARSE_DIRT || block == Blocks.PODZOL || block == Blocks.GRASS_BLOCK)) {
|
||||
if (worldserver.getType(blockposition1).isAir() && (iblockdata1.a(Blocks.FARMLAND) || iblockdata1.a(Blocks.DIRT) || iblockdata1.a(Blocks.COARSE_DIRT) || iblockdata1.a(Blocks.PODZOL) || iblockdata1.a(Blocks.GRASS_BLOCK))) {
|
||||
- worldserver.setTypeUpdate(blockposition1, this.blockFruit.getBlockData());
|
||||
+ // CraftBukkit start
|
||||
+ if (!CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition1, this.blockFruit.getBlockData())) {
|
||||
@@ -30,12 +30,12 @@
|
||||
worldserver.setTypeUpdate(blockposition, (IBlockData) this.blockFruit.d().getBlockData().set(BlockFacingHorizontal.FACING, enumdirection));
|
||||
}
|
||||
}
|
||||
@@ -66,7 +72,7 @@
|
||||
@@ -65,7 +71,7 @@
|
||||
int i = Math.min(7, (Integer) iblockdata.get(BlockStem.AGE) + MathHelper.nextInt(worldserver.random, 2, 5));
|
||||
IBlockData iblockdata1 = (IBlockData) iblockdata.set(BlockStem.AGE, i);
|
||||
|
||||
- worldserver.setTypeAndData(blockposition, iblockdata1, 2);
|
||||
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata1, 2); // CraftBukkit
|
||||
if (i == 7) {
|
||||
iblockdata1.a(worldserver, blockposition, worldserver.random);
|
||||
iblockdata1.b(worldserver, blockposition, worldserver.random);
|
||||
}
|
||||
|
Reference in New Issue
Block a user