Handle legacy block IDs in RPs
This commit is contained in:
parent
0d336ea988
commit
ab64f92fcb
1 changed files with 9 additions and 0 deletions
|
|
@ -180,6 +180,15 @@ public class DynmapBlockState {
|
||||||
DynmapBlockState blk = blocksByName.get(name);
|
DynmapBlockState blk = blocksByName.get(name);
|
||||||
if ((blk == null) && (name.indexOf(':') == -1)) {
|
if ((blk == null) && (name.indexOf(':') == -1)) {
|
||||||
blk = blocksByName.get("minecraft:" + name);
|
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;
|
return (blk != null) ? blk : AIR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue