SpawnData:

-Added null check when saving natural spawn entries
This commit is contained in:
Luis C.M committed 2023-06-03 17:10:10 -05:00
1 parent b50a9d39b0
commit 8732c3331c
1 file changed
+1 -1
@@ -82,7 +82,7 @@ public class SpawnData extends WeightedRandom.Item implements INaturalSpawn {
Set<Map.Entry<Integer,NBTTagCompound>> entries = this.spawnCompounds.entrySet();
for (Map.Entry<Integer,NBTTagCompound> entry : entries) {
compound.setTag("SpawnCompound"+entry.getKey(),entry.getValue());
compound.setTag("SpawnCompound" + entry.getKey(), entry.getValue() != null ? entry.getValue() : new NBTTagCompound());
}
compound.setBoolean("AnimalSpawning", animalSpawning);