Handle legacy block IDs in RPs

This commit is contained in:
Mike Primm 2019-09-29 16:44:39 -05:00
parent 0d336ea988
commit ab64f92fcb
1 changed files with 9 additions and 0 deletions

View File

@ -180,6 +180,15 @@ public class DynmapBlockState {
DynmapBlockState blk = blocksByName.get(name);
if ((blk == null) && (name.indexOf(':') == -1)) {
blk = blocksByName.get("minecraft:" + name);
if (blk == null) { // If still null, see if legacy ID number
try {
int v = Integer.parseInt(name);
if (v >= 0) {
blk = blocksByLegacyID.get(v);
}
} catch (NumberFormatException nfx) {
}
}
}
return (blk != null) ? blk : AIR;
}