mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 11:15:21 +01:00
Handle legacy block IDs in RPs
This commit is contained in:
parent
0d336ea988
commit
ab64f92fcb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user