Handle invalid block state from bad mods - avoid exception (#3231)
This commit is contained in:
parent
bd759ad68f
commit
492d378c4f
1 changed files with 1 additions and 1 deletions
|
|
@ -959,7 +959,7 @@ public class DynmapPlugin
|
||||||
BlockUpdateRec r = blockupdatequeue.remove();
|
BlockUpdateRec r = blockupdatequeue.remove();
|
||||||
BlockState bs = r.w.getBlockState(new BlockPos(r.x, r.y, r.z));
|
BlockState bs = r.w.getBlockState(new BlockPos(r.x, r.y, r.z));
|
||||||
int idx = Block.BLOCK_STATE_IDS.getId(bs);
|
int idx = Block.BLOCK_STATE_IDS.getId(bs);
|
||||||
if(!org.dynmap.hdmap.HDBlockModels.isChangeIgnoredBlock(stateByID[idx])) {
|
if((idx >= 0) && (!org.dynmap.hdmap.HDBlockModels.isChangeIgnoredBlock(stateByID[idx]))) {
|
||||||
if(onblockchange_with_id)
|
if(onblockchange_with_id)
|
||||||
mapManager.touch(r.wid, r.x, r.y, r.z, "blockchange[" + idx + "]");
|
mapManager.touch(r.wid, r.x, r.y, r.z, "blockchange[" + idx + "]");
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue