Fix potential NPE in villager skin registry.
This commit is contained in:
parent
136e2180f7
commit
9de739723f
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ public class VillagerRegistry
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public static ResourceLocation getVillagerSkin(int villagerType, ResourceLocation defaultSkin)
|
public static ResourceLocation getVillagerSkin(int villagerType, ResourceLocation defaultSkin)
|
||||||
{
|
{
|
||||||
if (instance().newVillagers.containsKey(villagerType))
|
if (instance().newVillagers != null && instance().newVillagers.containsKey(villagerType))
|
||||||
{
|
{
|
||||||
return instance().newVillagers.get(villagerType);
|
return instance().newVillagers.get(villagerType);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue