Fix some piston operations where pistons have their state toggled mid-operation

This commit is contained in:
zml2008 2012-01-16 16:49:54 -08:00
parent efb7b3509a
commit 31bd786fdf
2 changed files with 14 additions and 8 deletions

View File

@ -320,6 +320,10 @@ public enum BlockType {
shouldPlaceLast.add(BlockID.VINE); shouldPlaceLast.add(BlockID.VINE);
shouldPlaceLast.add(BlockID.LILY_PAD); shouldPlaceLast.add(BlockID.LILY_PAD);
shouldPlaceLast.add(BlockID.NETHER_WART); shouldPlaceLast.add(BlockID.NETHER_WART);
shouldPlaceLast.add(BlockID.PISTON_BASE);
shouldPlaceLast.add(BlockID.PISTON_STICKY_BASE);
shouldPlaceLast.add(BlockID.PISTON_EXTENSION);
shouldPlaceLast.add(BlockID.PISTON_MOVING_PIECE);
} }
/** /**
@ -346,13 +350,15 @@ public enum BlockType {
*/ */
private static final Set<Integer> shouldPlaceFinal = new HashSet<Integer>(); private static final Set<Integer> shouldPlaceFinal = new HashSet<Integer>();
static { static {
shouldPlaceLast.add(BlockID.SIGN_POST); shouldPlaceFinal.add(BlockID.SIGN_POST);
shouldPlaceLast.add(BlockID.WOODEN_DOOR); shouldPlaceFinal.add(BlockID.WOODEN_DOOR);
shouldPlaceLast.add(BlockID.WALL_SIGN); shouldPlaceFinal.add(BlockID.WALL_SIGN);
shouldPlaceLast.add(BlockID.IRON_DOOR); shouldPlaceFinal.add(BlockID.IRON_DOOR);
shouldPlaceLast.add(BlockID.CACTUS); shouldPlaceFinal.add(BlockID.CACTUS);
shouldPlaceLast.add(BlockID.REED); shouldPlaceFinal.add(BlockID.REED);
shouldPlaceLast.add(BlockID.CAKE_BLOCK); shouldPlaceFinal.add(BlockID.CAKE_BLOCK);
shouldPlaceFinal.add(BlockID.PISTON_EXTENSION);
shouldPlaceFinal.add(BlockID.PISTON_MOVING_PIECE);
} }
/** /**

View File

@ -61,7 +61,7 @@ public class RhinoCraftScriptEngine implements CraftScriptEngine {
if (e instanceof WrappedException) { if (e instanceof WrappedException) {
Throwable cause = ((WrappedException) e).getCause(); Throwable cause = ((WrappedException) e).getCause();
if (cause instanceof WorldEditException) { if (cause instanceof WorldEditException) {
throw ((WrappedException) e).getCause(); throw cause;
} }
} }