Fixed extended piston rotation.

This commit is contained in:
TomyLobo 2011-09-24 03:00:10 +02:00
parent bfc877cdb2
commit 7c18327fdc
2 changed files with 13 additions and 10 deletions

View File

@ -281,6 +281,7 @@ public enum BlockType {
shouldPlaceLast.add(BlockID.DETECTOR_RAIL);
shouldPlaceLast.add(BlockID.LONG_GRASS);
shouldPlaceLast.add(BlockID.DEAD_BUSH);
shouldPlaceLast.add(BlockID.PISTON_EXTENSION);
shouldPlaceLast.add(BlockID.YELLOW_FLOWER);
shouldPlaceLast.add(BlockID.RED_FLOWER);
shouldPlaceLast.add(BlockID.BROWN_MUSHROOM);

View File

@ -155,11 +155,12 @@ public final class BlockData {
case BlockID.PISTON_BASE:
case BlockID.PISTON_STICKY_BASE:
case BlockID.PISTON_EXTENSION:
switch(data) {
case 2: return 5;
case 3: return 4;
case 4: return 2;
case 5: return 3;
final int rest = data & ~0x7;
switch (data & 0x7) {
case 2: return 5 | rest;
case 3: return 4 | rest;
case 4: return 2 | rest;
case 5: return 3 | rest;
}
case BlockID.BROWN_MUSHROOM_CAP:
@ -309,11 +310,12 @@ public final class BlockData {
case BlockID.PISTON_BASE:
case BlockID.PISTON_STICKY_BASE:
case BlockID.PISTON_EXTENSION:
switch(data) {
case 5: return 2;
case 4: return 3;
case 2: return 4;
case 3: return 5;
final int rest = data & ~0x7;
switch (data & 0x7) {
case 5: return 2 | rest;
case 4: return 3 | rest;
case 2: return 4 | rest;
case 3: return 5 | rest;
}
case BlockID.BROWN_MUSHROOM_CAP: