Fix issues with ZombieVillagers Closes #3398

1.11 doesn't intertwine zombie types anymore so our edits to split them out for custom professions are not needed.
This commit is contained in:
LexManos committed 2016-11-17 12:14:23 -08:00
1 parent f028ba88f5
commit 85a2a2e661
4 files changed
+22 -83

No files matched your search

@@ -323,10 +323,7 @@ public class VillagerRegistry
List<VillagerProfession> entries = INSTANCE.professions.getValues();
entity.setProfession(entries.get(rand.nextInt(entries.size())));
}
public static void setRandomProfession(EntityZombieVillager entity, Random rand)
{
List<VillagerProfession> entries = INSTANCE.professions.getValues();
}
@@ -335,17 +332,6 @@ public class VillagerRegistry
//Below this is INTERNAL USE ONLY DO NOT USE MODDERS
public static void onSetProfession(EntityVillager entity, VillagerProfession prof)
{
int network = INSTANCE.professions.getId(prof);
if (network == -1 || prof != INSTANCE.professions.getObjectById(network))
{
throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + network + " " + prof);
}
if (network != entity.getProfession())
entity.setProfession(network);
}
public static void onSetProfession(EntityVillager entity, int network)
{
VillagerProfession prof = INSTANCE.professions.getObjectById(network);
@@ -358,18 +344,12 @@ public class VillagerRegistry
entity.setProfession(prof);
}
@SuppressWarnings("deprecation")
public static void onSetProfession(EntityZombieVillager entity, VillagerProfession prof)
{
}
public static void onSetProfession(EntityZombieVillager entity, int network)
{
int realID = network;
VillagerProfession prof = INSTANCE.professions.getObjectById(realID);
if (prof == null && network != 0 || INSTANCE.professions.getId(prof) != realID)
VillagerProfession prof = INSTANCE.professions.getObjectById(network);
if (prof == null && network != -1 || INSTANCE.professions.getId(prof) != network)
{
throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + realID + " " + prof);
throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + network + " " + prof);
}
if (prof != entity.getForgeProfession())