Correctly detect invalid PistonExtension's to allow removal of StickyPistons. Fixes BUKKIT-2059
Dieser Commit ist enthalten in:
Ursprung
ab8b7c7e33
Commit
823e3fb0c6
@ -15,7 +15,7 @@ public class BlockPistonExtension extends Block {
|
|||||||
|
|
||||||
public void remove(World world, int i, int j, int k, int l, int i1) {
|
public void remove(World world, int i, int j, int k, int l, int i1) {
|
||||||
super.remove(world, i, j, k, l, i1);
|
super.remove(world, i, j, k, l, i1);
|
||||||
if (i1 > 5 || i1 < 0) return; // CraftBukkit - fixed a piston AIOOBE issue
|
if ((i1 & 7) >= Facing.OPPOSITE_FACING.length) return; // CraftBukkit - fixed a piston AIOOBE issue
|
||||||
int j1 = Facing.OPPOSITE_FACING[f(i1)];
|
int j1 = Facing.OPPOSITE_FACING[f(i1)];
|
||||||
|
|
||||||
i += Facing.b[j1];
|
i += Facing.b[j1];
|
||||||
@ -142,7 +142,7 @@ public class BlockPistonExtension extends Block {
|
|||||||
|
|
||||||
public void doPhysics(World world, int i, int j, int k, int l) {
|
public void doPhysics(World world, int i, int j, int k, int l) {
|
||||||
int i1 = f(world.getData(i, j, k));
|
int i1 = f(world.getData(i, j, k));
|
||||||
if (i1 > 5 || i1 < 0) return; // CraftBukkit - fixed a piston AIOOBE issue
|
if ((i1 & 7) >= Facing.OPPOSITE_FACING.length) return; // CraftBukkit - fixed a piston AIOOBE issue
|
||||||
int j1 = world.getTypeId(i - Facing.b[i1], j - Facing.c[i1], k - Facing.d[i1]);
|
int j1 = world.getTypeId(i - Facing.b[i1], j - Facing.c[i1], k - Facing.d[i1]);
|
||||||
|
|
||||||
if (j1 != Block.PISTON.id && j1 != Block.PISTON_STICKY.id) {
|
if (j1 != Block.PISTON.id && j1 != Block.PISTON_STICKY.id) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren