Archiviert
13
0

Return the valid max value for piston direction. Fixes BUKKIT-2191

By returning the following value (7) we remove the need to special
case pistons in any way (other than the original purpose of this
check, which is to ensure pistons have valid data)
Dieser Commit ist enthalten in:
feildmaster 2013-01-23 06:15:21 -06:00
Ursprung 9ba0ddc292
Commit 641ecc4f34
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -217,7 +217,7 @@ public class BlockPiston extends Block {
}
public static int e(int i) {
if ((i & 7) >= Facing.OPPOSITE_FACING.length) return 0; // CraftBukkit - check for AIOOB on piston data
if ((i & 7) >= Facing.OPPOSITE_FACING.length) return 7; // CraftBukkit - check for AIOOB on piston data
return i & 7;
}

Datei anzeigen

@ -429,8 +429,8 @@ public class Chunk {
if (l != 0) {
if (!this.world.isStatic) {
// CraftBukkit start - Don't extend piston until data is set, don't "place" if we're processing the event
if (!this.world.suppressPhysics && (!(Block.byId[l] instanceof BlockPiston) || i2 != 0)) {
// CraftBukkit start - Don't "place" if we're processing the event
if (!this.world.suppressPhysics) {
Block.byId[l].onPlace(this.world, j2, j, k2);
}
// CraftBukkit end