Skip to content

Commit

Permalink
Fix crash when going through all items
Browse files Browse the repository at this point in the history
  • Loading branch information
HeathLoganCampbell committed Jul 3, 2019
1 parent c135de9 commit 3eefed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/craftclassic/play/blocks/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void setId(int id) {

public static Block getBlockById(int id)
{
return idToBlocks.get(id);
return idToBlocks.getOrDefault(id, Block.DIRT);
}

public boolean isPhysics() {
Expand Down

0 comments on commit 3eefed9

Please sign in to comment.