Skip to content

Commit

Permalink
Handle invalid block state from bad mods - avoid exception (webbukkit…
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeprimm committed Jan 2, 2021
1 parent 17bf9e9 commit 6680928
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ public void tickEvent(TickEvent.ServerTickEvent event) {
BlockUpdateRec r = blockupdatequeue.remove();
BlockState bs = r.w.getBlockState(new BlockPos(r.x, r.y, r.z));
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)
mapManager.touch(r.wid, r.x, r.y, r.z, "blockchange[" + idx + "]");
else
Expand Down

0 comments on commit 6680928

Please sign in to comment.