Update to Minecraft 1.12-pre6

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-05-30 21:25:59 +10:00
parent f69eb04edc
commit ea6ca4328a
35 changed files with 297 additions and 260 deletions

View File

@@ -9,22 +9,22 @@
public class BlockVine extends Block {
public static final BlockStateBoolean UP = BlockStateBoolean.of("up");
@@ -176,7 +178,13 @@
}
if (((Boolean) iblockdata1.get(BlockVine.NORTH)).booleanValue() || ((Boolean) iblockdata1.get(BlockVine.EAST)).booleanValue() || ((Boolean) iblockdata1.get(BlockVine.SOUTH)).booleanValue() || ((Boolean) iblockdata1.get(BlockVine.WEST)).booleanValue()) {
- world.setTypeAndData(blockposition1, iblockdata1, 2);
+ // CraftBukkit start - Call BlockSpreadEvent
+ // world.setTypeAndData(blockposition1, iblockdata1, 2);
+ BlockPosition target = blockposition1;
+ org.bukkit.block.Block source = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(target.getX(), target.getY(), target.getZ());
+ CraftEventFactory.handleBlockSpreadEvent(block, source, this, toLegacyData(iblockdata1));
+ // CraftBukkit end
}
@@ -177,7 +179,13 @@
}
@@ -198,17 +206,29 @@
if (((Boolean) iblockdata1.get(BlockVine.NORTH)).booleanValue() || ((Boolean) iblockdata1.get(BlockVine.EAST)).booleanValue() || ((Boolean) iblockdata1.get(BlockVine.SOUTH)).booleanValue() || ((Boolean) iblockdata1.get(BlockVine.WEST)).booleanValue()) {
- world.setTypeAndData(blockposition1, iblockdata1, 2);
+ // CraftBukkit start - Call BlockSpreadEvent
+ // world.setTypeAndData(blockposition1, iblockdata1, 2);
+ BlockPosition target = blockposition1;
+ org.bukkit.block.Block source = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(target.getX(), target.getY(), target.getZ());
+ CraftEventFactory.handleBlockSpreadEvent(block, source, this, toLegacyData(iblockdata1));
+ // CraftBukkit end
}
} else {
@@ -198,15 +206,26 @@
BlockPosition blockposition3 = blockposition2.shift(enumdirection2);
BlockPosition blockposition4 = blockposition2.shift(enumdirection3);
@@ -50,16 +50,12 @@
+ // world.setTypeAndData(blockposition4, this.getBlockData().set(getDirection(enumdirection.opposite()), Boolean.valueOf(true)), 2);
+ bukkitBlock = world.getWorld().getBlockAt(blockposition4.getX(), blockposition4.getY(), blockposition4.getZ());
+ CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData().set(getDirection(enumdirection.opposite()), Boolean.valueOf(true))));
} else if (this.a(world, blockposition2.up(), EnumDirection.DOWN)) {
- world.setTypeAndData(blockposition2, this.getBlockData(), 2);
+ // world.setTypeAndData(blockposition2, this.getBlockData(), 2);
+ CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData()));
}
+ // CraftBukkit end
} else if (iblockdata2.d(world, blockposition2, enumdirection) == EnumBlockFaceShape.SOLID) {
world.setTypeAndData(blockposition, iblockdata.set(getDirection(enumdirection), Boolean.valueOf(true)), 2);
}
@@ -235,7 +255,12 @@
@@ -233,7 +252,12 @@
}
if (((Boolean) iblockdata3.get(BlockVine.NORTH)).booleanValue() || ((Boolean) iblockdata3.get(BlockVine.EAST)).booleanValue() || ((Boolean) iblockdata3.get(BlockVine.SOUTH)).booleanValue() || ((Boolean) iblockdata3.get(BlockVine.WEST)).booleanValue()) {