Piston fixes

This commit is contained in:
Jesse Boyd 2017-10-07 15:40:04 +11:00
parent 8a8022e1a4
commit 76cfbeb4d0
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
3 changed files with 29 additions and 19 deletions

View File

@ -844,6 +844,7 @@ public class FaweCache {
}
list.add(tag);
}
if (clazz == null) clazz = EndTag.class;
return new ListTag(clazz, list);
}
@ -857,6 +858,7 @@ public class FaweCache {
}
list.add(tag);
}
if (clazz == null) clazz = EndTag.class;
return new ListTag(clazz, list);
}
}

View File

@ -72,11 +72,11 @@ public class RemapFilter extends MCAFilterCounter {
case 29:
case 33:
Map<String, Object> map = new HashMap<>();
map.put("Progress", 0f);
map.put("State", (byte) 0);
map.put("LastProgress", 0f);
map.put("NewState", (byte) 0);
map.put("isMoveable", (byte) 1);
map.put("Progress", 1f);
map.put("State", (byte) 2);
map.put("LastProgress", 1f);
map.put("NewState", (byte) 2);
map.put("isMoveable", (byte) 0);
map.put("id", "PistonArm");
map.put("AttachedBlocks", new ArrayList<>());
map.put("Sticky", (byte) (id == 29 ? 1 : 0));

View File

@ -278,12 +278,13 @@ public class ClipboardRemapper {
for (int id : new int[] {29, 33, 34}) {
mapPEtoPC.put(new BaseBlock(id,3), new BaseBlock(id,2));
mapPEtoPC.put(new BaseBlock(id,2), new BaseBlock(id,3));
mapPEtoPC.put(new BaseBlock(id,10), new BaseBlock(id,11));
mapPEtoPC.put(new BaseBlock(id,11), new BaseBlock(id,10));
mapPEtoPC.put(new BaseBlock(id,5), new BaseBlock(id,4));
mapPEtoPC.put(new BaseBlock(id,13), new BaseBlock(id,12));
mapPEtoPC.put(new BaseBlock(id,4), new BaseBlock(id,5));
mapPEtoPC.put(new BaseBlock(id,12), new BaseBlock(id,13));
// mapPEtoPC.put(new BaseBlock(id,11), new BaseBlock(id,10));
// mapPEtoPC.put(new BaseBlock(id,10), new BaseBlock(id,11));
// mapPEtoPC.put(new BaseBlock(id,13), new BaseBlock(id,12));
// mapPEtoPC.put(new BaseBlock(id,12), new BaseBlock(id,13));
}
mapPEtoPC.put(new BaseBlock(250,-1), new BaseBlock(36,-1));
@ -365,6 +366,16 @@ public class ClipboardRemapper {
HashMap<BaseBlock, BaseBlock> mapPEtoPC = getPEtoPCMappings();
for (Map.Entry<BaseBlock, BaseBlock> entry : mapPEtoPC.entrySet()) {
BaseBlock from = entry.getKey();
BaseBlock to = entry.getValue();
if (fromPlatform == RemapPlatform.PE) {
add(from, to);
} else {
add(to, from);
}
}
// TODO any custom ids
switch (fromPlatform) {
case PE:
@ -380,17 +391,14 @@ public class ClipboardRemapper {
for (int data = 8; data < 16; data++) add(new BaseBlock(205, data), new BaseBlock(182, 9));
for (int data = 0; data < 8; data++) add(new BaseBlock(182, data), new BaseBlock(182, 0));
for (int data = 8; data < 16; data++) add(new BaseBlock(182, data), new BaseBlock(182, 8));
break;
}
for (Map.Entry<BaseBlock, BaseBlock> entry : mapPEtoPC.entrySet()) {
BaseBlock from = entry.getKey();
BaseBlock to = entry.getValue();
if (fromPlatform == RemapPlatform.PE) {
add(from, to);
} else {
add(to, from);
}
for (int id : new int[] {29, 33, 34}) {
for (int data = 8; data < 16; data++) {
add(new BaseBlock(id, data), remap(new BaseBlock(id, data - 8)));
}
}
break;
}
this.from = fromPlatform;