Advertisement
Guest User

Untitled

a guest
Sep 6th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. Render File:
  2.  
  3. package com.animalcraft.animal;
  4.  
  5. import com.animalcraft.Main;
  6.  
  7. import cpw.mods.fml.common.registry.EntityRegistry;
  8. import net.minecraft.entity.EntityList;
  9. import net.minecraft.entity.EnumCreatureType;
  10. import net.minecraft.world.biome.BiomeGenBase;
  11.  
  12. public class RegRedPanda
  13. {
  14. public static void mainRegistry()
  15. {
  16. registerEntity();
  17. }
  18. public static void registerEntity()
  19. {
  20. createEntity(EntityRedPanda.class, "Red Panda", 0x854709, 0xE89643);
  21. }
  22. public static void createEntity(Class entityClass, String entityName, int solidColor, int spotColor)
  23. {
  24. int randomId = EntityRegistry.findGlobalUniqueEntityId();
  25. EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
  26. EntityRegistry.registerModEntity(entityClass, entityName, randomId, Main.modInstance, 64, 1, true);
  27. EntityRegistry.addSpawn(entityClass, 3, 0, 1, EnumCreatureType.creature, BiomeGenBase.beach);
  28.  
  29. createEgg(randomId, solidColor, spotColor);
  30. }
  31.  
  32. private static void createEgg(int randomId, int solidColor, int spotColor)
  33. {
  34. EntityList.entityEggs.put(Integer.valueOf(randomId), new EntityList.EntityEggInfo(randomId, solidColor, spotColor));
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement