mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Prevent NullPointerException when adding new loot pool. (#7605)
This commit is contained in:
1 file changed
+1
-1
@@ -83,7 +83,7 @@
|
||||
+
|
||||
+ public void addPool(LootPool pool) {
|
||||
+ checkFrozen();
|
||||
+ if (field_186466_c.stream().anyMatch(e -> e == pool || e.getName().equals(pool.getName())))
|
||||
+ if (field_186466_c.stream().anyMatch(e -> e == pool || e.getName() != null && e.getName().equals(pool.getName())))
|
||||
+ throw new RuntimeException("Attempted to add a duplicate pool to loot table: " + pool.getName());
|
||||
+ this.field_186466_c.add(pool);
|
||||
+ }
|
||||
|
||||
Reference in new issue
Block a user