Accept more 1.9.4 version strings. Fix NPE for custom villager types and their associated zombie spawns. Still needs review.

This commit is contained in:
cpw 2016-06-23 09:29:03 -04:00
parent 254cf8bb23
commit cc593f3939
2 changed files with 2 additions and 2 deletions

View file

@ -225,7 +225,7 @@ public class FMLModContainer implements ModContainer
String mcVersionString = (String)descriptor.get("acceptedMinecraftVersions");
if ("[1.8.8]".equals(mcVersionString)) mcVersionString = "[1.8.8,1.8.9]"; // MC 1.8.8 and 1.8.9 is forward SRG compatible so accept these versions by default.
if ("[1.9.4]".equals(mcVersionString) || "[1.9,1.9.4]".equals(mcVersionString)) mcVersionString = "[1.9.4,1.10]"; // MC 1.8.8 and 1.8.9 is forward SRG compatible so accept these versions by default.
if ("[1.9.4]".equals(mcVersionString) || "[1.9,1.9.4]".equals(mcVersionString) || "[1.9.4,1.10)".equals(mcVersionString)) mcVersionString = "[1.9.4,1.10]"; // MC 1.8.8 and 1.8.9 is forward SRG compatible so accept these versions by default.
if (!Strings.isNullOrEmpty(mcVersionString))
{
minecraftAccepted = VersionParser.parseRange(mcVersionString);

View file

@ -375,7 +375,7 @@ public class VillagerRegistry
}
}
else if (entity.func_189777_di() != null)
entity.func_189778_a(null);
entity.func_189778_a(ZombieType.NORMAL);
}
public static void onSetProfession(EntityZombie entity, ZombieType type, int network)
{