Skip to content

Commit

Permalink
Fix potential NPE when calling ItemMobSpawner#loadSpawners.
Browse files Browse the repository at this point in the history
  • Loading branch information
wlhlm committed Jul 16, 2023
1 parent d613d06 commit 588acc8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/codechicken/nei/ItemMobSpawner.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

public class ItemMobSpawner extends ItemBlock {

private static Map<Integer, EntityLiving> entityHashMap;
private static Map<Integer, String> IDtoNameMap;
private static final Map<Integer, EntityLiving> entityHashMap = new HashMap<>();
private static final Map<Integer, String> IDtoNameMap = new HashMap<>();
public static int idPig;
private static boolean loaded;

Expand All @@ -32,9 +32,6 @@ public ItemMobSpawner() {

hasSubtypes = true;
MinecraftForgeClient.registerItemRenderer(this, new SpawnerRenderer());

entityHashMap = new HashMap<>();
IDtoNameMap = new HashMap<>();
}

/**
Expand Down

0 comments on commit 588acc8

Please sign in to comment.