forked from SteamWar/SteamWar
Fix v3Mode handling in WorldEditWrapper14
This commit is contained in:
@@ -565,17 +565,17 @@ public class WorldEditWrapper14 implements WorldEditWrapper {
|
||||
for (Map<String, Tag> tileEntity : tileEntityTags) {
|
||||
int[] pos = requireTag(tileEntity, "Pos", IntArrayTag.class).getValue();
|
||||
final BlockVector3 pt = BlockVector3.at(pos[0], pos[1], pos[2]);
|
||||
Map<String, Tag> values = Maps.newHashMap(tileEntity);
|
||||
Map<String, Tag> values = Maps.newHashMap(v3Mode ? requireTag(tileEntity, "Data", CompoundTag.class).getValue() : tileEntity);
|
||||
if(faweSchem){
|
||||
values.put("x", new IntTag(pt.getBlockX() - offsetX));
|
||||
values.put("y", new IntTag(pt.getBlockY() - offsetY));
|
||||
values.put("z", new IntTag(pt.getBlockZ() - offsetZ));
|
||||
}else{
|
||||
values.put("x", new IntTag(pt.getBlockX()));
|
||||
values.put("y", new IntTag(pt.getBlockY()));
|
||||
values.put("z", new IntTag(pt.getBlockZ()));
|
||||
values.putIfAbsent("x", new IntTag(pt.getBlockX()));
|
||||
values.putIfAbsent("y", new IntTag(pt.getBlockY()));
|
||||
values.putIfAbsent("z", new IntTag(pt.getBlockZ()));
|
||||
}
|
||||
values.put("id", values.get("Id"));
|
||||
values.putIfAbsent("id", values.get("Id"));
|
||||
values.remove("Id");
|
||||
values.remove("Pos");
|
||||
if (fixer != null) {
|
||||
|
||||
Reference in New Issue
Block a user