Update to Minecraft 1.9

This commit is contained in:
md_5
2016-03-01 08:32:46 +11:00
parent e1ebe524a7
commit aa008dff0f
305 changed files with 6684 additions and 6105 deletions

View File

@@ -6,15 +6,16 @@
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
+
public class BlockCommand extends BlockContainer {
public class BlockCommand extends BlockTileEntity {
public static final BlockStateBoolean TRIGGERED = BlockStateBoolean.of("triggered");
@@ -20,10 +22,19 @@
boolean flag = world.isBlockIndirectlyPowered(blockposition);
boolean flag1 = ((Boolean) iblockdata.get(BlockCommand.TRIGGERED)).booleanValue();
public static final BlockStateDirection a = BlockDirectional.FACING;
@@ -29,7 +31,17 @@
boolean flag1 = tileentitycommand.d();
boolean flag2 = tileentitycommand.e();
- if (flag && !flag1) {
- if (flag && !flag1) {
+ // CraftBukkit start
+ // PAIL: This section - renames, ordering
+ org.bukkit.block.Block bukkitBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ int old = flag1 ? 15 : 0;
+ int current = flag ? 15 : 0;
@@ -24,10 +25,15 @@
+ // CraftBukkit end
+
+ if (eventRedstone.getNewCurrent() > 0 && !(eventRedstone.getOldCurrent() > 0)) { // CraftBukkit
world.setTypeAndData(blockposition, iblockdata.set(BlockCommand.TRIGGERED, Boolean.valueOf(true)), 4);
world.a(blockposition, (Block) this, this.a(world));
- } else if (!flag && flag1) {
tileentitycommand.a(true);
if (tileentitycommand.i() != TileEntityCommand.Type.SEQUENCE && !flag2) {
boolean flag3 = !tileentitycommand.j() || this.e(world, blockposition, iblockdata);
@@ -40,7 +52,7 @@
this.c(world, blockposition);
}
}
- } else if (!flag && flag1) {
+ } else if (!(eventRedstone.getNewCurrent() > 0) && eventRedstone.getOldCurrent() > 0) { // CraftBukkit
world.setTypeAndData(blockposition, iblockdata.set(BlockCommand.TRIGGERED, Boolean.valueOf(false)), 4);
}
}
tileentitycommand.a(false);
}