Added a null check for config file entity spawns
This commit is contained in:
parent
a49339667f
commit
b3eaca7d51
|
@ -57,17 +57,20 @@ public class JsonEntitySpawn
|
|||
|
||||
for (JsonEntitySpawn entitySpawn : jsonBiome.entities)
|
||||
{
|
||||
try
|
||||
{
|
||||
EnumCreatureType creatureType = EnumCreatureType.valueOf(entitySpawn.entityType.toUpperCase());
|
||||
Class entityClass = Class.forName(entitySpawn.entityClass);
|
||||
if (entitySpawn != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
EnumCreatureType creatureType = EnumCreatureType.valueOf(entitySpawn.entityType.toUpperCase());
|
||||
Class entityClass = Class.forName(entitySpawn.entityClass);
|
||||
|
||||
biome.getSpawnableList(creatureType).add(new BiomeGenBase.SpawnListEntry(entityClass, entitySpawn.weight, entitySpawn.minGroupCount, entitySpawn.maxGroupCount));
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
biome.getSpawnableList(creatureType).add(new BiomeGenBase.SpawnListEntry(entityClass, entitySpawn.weight, entitySpawn.minGroupCount, entitySpawn.maxGroupCount));
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue