use of net.minecraft.entity.EntityEggInfo in project MineFactoryReloaded by powercrystals.
the class TwilightForestEggHandler method getEgg.
@SuppressWarnings("unchecked")
@Override
public EntityEggInfo getEgg(ItemStack safariNet) {
Class<? extends Entity> entityClass = (Class<? extends Entity>) EntityList.stringToClassMapping.get(safariNet.getTagCompound().getString("id"));
if (entityClass == null) {
return null;
}
EntityRegistration er = EntityRegistry.instance().lookupModSpawn(entityClass, true);
if (er != null && er.getContainer() == TwilightForest.twilightForestContainer) {
return (EntityEggInfo) TwilightForest.entityEggs.get(er.getModEntityId());
}
return null;
}
Aggregations