Fix LPCommandMode

This commit is contained in:
Jesse Boyd 2017-10-06 17:49:17 +11:00
parent 201809aedd
commit 31a9c4561c
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 7 additions and 7 deletions

View File

@ -346,10 +346,9 @@ public class ClipboardRemapper {
for (int data = 4; data < 12; data++) mapPEtoPC.put(new BaseBlock(id, data), new BaseBlock(id, 15 - data)); for (int data = 4; data < 12; data++) mapPEtoPC.put(new BaseBlock(id, data), new BaseBlock(id, 15 - data));
for (int data = 12; data < 15; data++) mapPEtoPC.put(new BaseBlock(id, data), new BaseBlock(id, 27 - data)); for (int data = 12; data < 15; data++) mapPEtoPC.put(new BaseBlock(id, data), new BaseBlock(id, 27 - data));
mapPEtoPC.put(new BaseBlock(id, 2), new BaseBlock(id, 0)); mapPEtoPC.put(new BaseBlock(id, 0), new BaseBlock(id, 2));
mapPEtoPC.put(new BaseBlock(id, 3), new BaseBlock(id, 1)); mapPEtoPC.put(new BaseBlock(id, 3), new BaseBlock(id, 1));
mapPEtoPC.put(new BaseBlock(id, 9), new BaseBlock(id, 7));
mapPEtoPC.put(new BaseBlock(id, 7), new BaseBlock(id, 9));
mapPEtoPC.put(new BaseBlock(id, 6), new BaseBlock(id, 8)); mapPEtoPC.put(new BaseBlock(id, 6), new BaseBlock(id, 8));
} }

View File

@ -27,7 +27,6 @@ import com.sk89q.jnbt.NamedTag;
import com.sk89q.jnbt.ShortTag; import com.sk89q.jnbt.ShortTag;
import com.sk89q.jnbt.StringTag; import com.sk89q.jnbt.StringTag;
import com.sk89q.worldedit.blocks.BaseBlock; import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.blocks.BlockID;
import com.sk89q.worldedit.world.registry.BundledBlockData; import com.sk89q.worldedit.world.registry.BundledBlockData;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.DataOutput; import java.io.DataOutput;
@ -488,19 +487,21 @@ public class MCAFile2LevelDB extends MapConverter {
map.put("Version", new IntTag(3)); map.put("Version", new IntTag(3));
BaseBlock block = chunk.getBlock(x & 15, y, z & 15); BaseBlock block = chunk.getBlock(x & 15, y, z & 15);
int LPCommandMode = 0; int LPCommandMode = 0;
switch (block.getId()) { switch (block.getId()) {
case BlockID.CHAIN_COMMAND_BLOCK: case 189:
LPCommandMode = 2; LPCommandMode = 2;
break; break;
case BlockID.REPEATING_COMMAND_BLOCK: case 188:
LPCommandMode = 1; LPCommandMode = 1;
break; break;
} }
map.putIfAbsent("isMovable", new ByteTag((byte) 1)); map.putIfAbsent("isMovable", new ByteTag((byte) 1));
map.put("LPCommandMode", new IntTag(LPCommandMode)); map.put("LPCommandMode", new IntTag(LPCommandMode));
map.put("LPCondionalMode", new ByteTag((byte) (block.getData() > 7 ? 1 : 0))); map.put("LPCondionalMode", new ByteTag((byte) (block.getData() > 7 ? 1 : 0)));
map.put("LPRedstoneMode", new ByteTag(tag.getByte("auto"))); map.put("LPRedstoneMode", new ByteTag((byte) (tag.getByte("auto") == 0 ? 1 : 0)));
break; break;
} }
} }