Updated to Minecraft version 1.4

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
CraftBukkit/Spigot
2011-03-31 21:40:00 +01:00
parent 3669bb0d8b
commit adcc9c9ddf
14 changed files with 35 additions and 30 deletions

View File

@@ -387,12 +387,12 @@ public class CraftBlock implements Block {
int power = 0;
BlockRedstoneWire wire = (BlockRedstoneWire) net.minecraft.server.Block.REDSTONE_WIRE;
net.minecraft.server.World world = chunk.getHandle().d;
if ((face == BlockFace.DOWN || face == BlockFace.SELF) && world.i(x, y - 1, z, 0)) power = wire.g(world, x, y - 1, z, power);
if ((face == BlockFace.UP || face == BlockFace.SELF) && world.i(x, y + 1, z, 1)) power = wire.g(world, x, y + 1, z, power);
if ((face == BlockFace.EAST || face == BlockFace.SELF) && world.i(x, y, z - 1, 2)) power = wire.g(world, x, y, z - 1, power);
if ((face == BlockFace.WEST || face == BlockFace.SELF) && world.i(x, y, z + 1, 3)) power = wire.g(world, x, y, z + 1, power);
if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.i(x - 1, y, z, 4)) power = wire.g(world, x - 1, y, z, power);
if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.i(x + 1, y, z, 5)) power = wire.g(world, x + 1, y, z, power);
if ((face == BlockFace.DOWN || face == BlockFace.SELF) && world.i(x, y - 1, z, 0)) power = wire.f(world, x, y - 1, z, power);
if ((face == BlockFace.UP || face == BlockFace.SELF) && world.i(x, y + 1, z, 1)) power = wire.f(world, x, y + 1, z, power);
if ((face == BlockFace.EAST || face == BlockFace.SELF) && world.i(x, y, z - 1, 2)) power = wire.f(world, x, y, z - 1, power);
if ((face == BlockFace.WEST || face == BlockFace.SELF) && world.i(x, y, z + 1, 3)) power = wire.f(world, x, y, z + 1, power);
if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.i(x - 1, y, z, 4)) power = wire.f(world, x - 1, y, z, power);
if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.i(x + 1, y, z, 5)) power = wire.f(world, x + 1, y, z, power);
return power > 0 ? power : (face == BlockFace.SELF ? isBlockIndirectlyPowered() : isBlockFaceIndirectlyPowered(face)) ? 15 : 0;
}

View File

@@ -32,7 +32,7 @@ public class CraftChest extends CraftBlockState implements Chest {
boolean result = super.update(force);
if (result) {
chest.h();
chest.i();
}
return result;

View File

@@ -49,7 +49,7 @@ public class CraftDispenser extends CraftBlockState implements Dispenser {
boolean result = super.update(force);
if (result) {
dispenser.h();
dispenser.i();
}
return result;

View File

@@ -32,7 +32,7 @@ public class CraftFurnace extends CraftBlockState implements Furnace {
boolean result = super.update(force);
if (result) {
furnace.h();
furnace.i();
}
return result;

View File

@@ -33,7 +33,7 @@ public class CraftSign extends CraftBlockState implements Sign {
boolean result = super.update(force);
if (result) {
sign.h();
sign.i();
}
return result;