Update to Minecraft 1.9

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-03-01 08:32:46 +11:00
parent 2da480a9c8
commit 21d4bf5d1f
305 changed files with 6684 additions and 6105 deletions

View File

@@ -9,27 +9,27 @@
public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement {
public static final BlockStateInteger AGE = BlockStateInteger.of("age", 0, 7);
@@ -31,7 +33,10 @@
@@ -53,7 +55,10 @@
float f = a((Block) this, world, blockposition);
if (random.nextInt((int) (25.0F / f) + 1) == 0) {
- world.setTypeAndData(blockposition, iblockdata.set(BlockCrops.AGE, Integer.valueOf(i + 1)), 2);
- world.setTypeAndData(blockposition, this.setAge(i + 1), 2);
+ // CraftBukkit start
+ IBlockData data = iblockdata.set(AGE, Integer.valueOf(i + 1));
+ IBlockData data = this.setAge(i + 1);
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
+ // CraftBukkit end
}
}
}
@@ -45,7 +50,10 @@
i = 7;
@@ -68,7 +73,10 @@
i = j;
}
- world.setTypeAndData(blockposition, iblockdata.set(BlockCrops.AGE, Integer.valueOf(i)), 2);
- world.setTypeAndData(blockposition, this.setAge(i), 2);
+ // CraftBukkit start
+ IBlockData data = iblockdata.set(AGE, Integer.valueOf(i));
+ IBlockData data = this.setAge(i);
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
+ // CraftBukkit end
}
protected static float a(Block block, World world, BlockPosition blockposition) {
protected int b(World world) {