Fix block state NBT encoding

This commit is contained in:
Mike Primm 2021-07-26 21:15:20 -05:00
parent d77a9c76da
commit 74f46cd8fe
2 changed files with 1231 additions and 1341 deletions

View File

@ -169,12 +169,15 @@ public class ChunkSnapshot
CompoundTag prop = tc.getCompound("Properties");
for (String pid : prop.getAllKeys()) {
if (statestr.length() > 0) statestr.append(',');
statestr.append(pid).append('=').append(prop.get(pid).toString());
statestr.append(pid).append('=').append(prop.get(pid).getAsString());
}
palette[pi] = DynmapBlockState.getStateByNameAndState(pname, statestr.toString());
//Log.info("getStateByNameAndState(" + pname + "," + statestr.toString() + ")=" + palette[pi]);
//if (pname.contains("grass_block")) { Log.info("getStateByNameAndState(" + pname + "," + statestr.toString() + ")=" + palette[pi]); }
}
if (palette[pi] == null) {
palette[pi] = DynmapBlockState.getBaseStateByName(pname);
//if (pname.contains("grass_block")) { Log.info("getBaseStateByName(" + pname + ")=" + palette[pi]); }
}
if (palette[pi] == null) {
palette[pi] = DynmapBlockState.AIR;