Advertisement
Guest User

Main Mod Class Mob Rendering Issue

a guest
Aug 3rd, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 7.35 KB | None | 0 0
  1. package jacobmob.fantasticalfantasycreatures.common;
  2.  
  3. import jacobmob.fantasticalfantasycreatures.biome.BiomeTangerine;
  4. import jacobmob.fantasticalfantasycreatures.block.BlockTangerineGrass;
  5. import jacobmob.fantasticalfantasycreatures.block.BlockTangerineLeaf;
  6. import jacobmob.fantasticalfantasycreatures.block.BlockTangerinePlanks;
  7. import jacobmob.fantasticalfantasycreatures.block.BlockTangerineWood;
  8. import jacobmob.fantasticalfantasycreatures.creativetab.CreativeTabFantasticalFantasyCreatures;
  9. import jacobmob.fantasticalfantasycreatures.item.ItemAqueduck;
  10. import jacobmob.fantasticalfantasycreatures.item.ItemBearFur;
  11. import jacobmob.fantasticalfantasycreatures.item.ItemBearasaurusClaw;
  12. import jacobmob.fantasticalfantasycreatures.item.ItemBlubber;
  13. import jacobmob.fantasticalfantasycreatures.item.ItemCookedAqueduck;
  14. import jacobmob.fantasticalfantasycreatures.item.ItemCookedCrab;
  15. import jacobmob.fantasticalfantasycreatures.item.ItemCrab;
  16. import jacobmob.fantasticalfantasycreatures.item.ItemFrogEye;
  17. import jacobmob.fantasticalfantasycreatures.item.ItemFrogSkin;
  18. import jacobmob.fantasticalfantasycreatures.item.ItemLogo;
  19. import jacobmob.fantasticalfantasycreatures.item.ItemTangerine;
  20. import jacobmob.fantasticalfantasycreatures.item.ItemTangerineShell;
  21. import jacobmob.fantasticalfantasycreatures.mobs.EntitySnabical;
  22. import jacobmob.fantasticalfantasycreatures.mobs.Snabical;
  23. import jacobmob.fantasticalfantasycreatures.weapon.ItemLightningSword;
  24. import net.minecraft.block.Block;
  25. import net.minecraft.block.material.Material;
  26. import net.minecraft.creativetab.CreativeTabs;
  27. import net.minecraft.entity.Entity;
  28. import net.minecraft.entity.EntityEggInfo;
  29. import net.minecraft.entity.EntityList;
  30. import net.minecraft.entity.EnumCreatureType;
  31. import net.minecraft.item.EnumToolMaterial;
  32. import net.minecraft.item.Item;
  33. import net.minecraft.world.biome.BiomeGenBase;
  34. import net.minecraftforge.common.EnumHelper;
  35. import cpw.mods.fml.common.Mod;
  36. import cpw.mods.fml.common.Mod.Init;
  37. import cpw.mods.fml.common.SidedProxy;
  38. import cpw.mods.fml.common.event.FMLInitializationEvent;
  39. import cpw.mods.fml.common.network.NetworkMod;
  40. import cpw.mods.fml.common.registry.EntityRegistry;
  41. import cpw.mods.fml.common.registry.GameRegistry;
  42. import cpw.mods.fml.common.registry.LanguageRegistry;
  43.  
  44. @Mod(modid = "FantasticalFantasyCreatures", name = "Fantastic Fantasy Creatures Mod", version = "Alpha Prerelease 1")
  45. @NetworkMod(clientSideRequired = true, serverSideRequired = false)
  46.  
  47. public class FantasticalFantasyCreatures {
  48. @SidedProxy(clientSide = "jacobmob.fantasticalfantasycreatures.client.ClientProxy", serverSide = "jacobmob.fantasticalfantasycreatures.common.CommonProxy")
  49. public static CommonProxy proxy;
  50.  
  51. //Tool Materials
  52.  
  53. //Weapon Materials
  54. public static EnumToolMaterial toolLightningWeapons = EnumHelper.addToolMaterial("LIGHTNINGWEAPONS", 2, 250, 6.0F, 2.0F, 10);
  55.  
  56. //Creative Tab
  57. public static CreativeTabs TabFantasticalFantasyCreatures = new CreativeTabFantasticalFantasyCreatures(CreativeTabs.getNextID(), "FantasticalFantasyCreatures");
  58.  
  59. //Trees
  60. TreeManager treeManager = new TreeManager();
  61.  
  62. //Blocks
  63. public static Block TangerineLeaf = new BlockTangerineLeaf(3107, Material.leaves).setUnlocalizedName("TangerineLeaf");
  64. public static Block TangerineWood = new BlockTangerineWood(3108, Material.wood).setUnlocalizedName("TangerineWood");
  65. public static Block TangerineGrass = new BlockTangerineGrass(176, Material.grass).setUnlocalizedName("TangerineGrass");
  66. public static Block TangerinePlanks = new BlockTangerinePlanks(3113, Material.wood).setUnlocalizedName("TangerinePlanks");
  67.  
  68. //Tangerine Biome
  69. public static BiomeGenBase TangerineBiome = new BiomeTangerine(41).setBiomeName("TangerineBiome").setMinMaxHeight(0.6F, 1F);
  70.  
  71. //Fur/Hide
  72. public static Item BearFur = new ItemBearFur(3103).setUnlocalizedName("BearFur");
  73. public static Item FrogSkin = new ItemFrogSkin(3106).setUnlocalizedName("FrogSkin");
  74. public static Item TangerineShell = new ItemTangerineShell(3110).setUnlocalizedName("TangerineShell");
  75.  
  76. //Claw
  77. public static Item BearasaurusClaw = new ItemBearasaurusClaw(3104).setUnlocalizedName("BearasaurusClaw");
  78.  
  79. //Raw Food
  80. public static Item Crab = new ItemCrab(3100, 4, 4.6F, true).setUnlocalizedName("Crab");
  81. public static Item Aqueduck = new ItemAqueduck(3102, 4, 2.4F, true).setUnlocalizedName("Aqueduck");
  82. public static Item Tangerine = new ItemTangerine(3109, 3, 1.8F, false).setUnlocalizedName("Tangerine");
  83. public static Item FrogEye = new ItemFrogEye(3105, 2, 10.F, false).setUnlocalizedName("FrogEye");
  84.  
  85. //Cooked Food
  86. public static Item CookedCrab = new ItemCookedCrab(3114, 7, 7.2f, true).setUnlocalizedName("CookedCrab");
  87. public static Item CookedAqueduck = new ItemCookedAqueduck(3115, 11, 13.2F, true).setUnlocalizedName("CookedAqueduck");
  88.  
  89. //Misc Drops
  90. public static Item Blubber = new ItemBlubber(3101).setUnlocalizedName("Blubber");
  91.  
  92.  
  93. //Lightning Weapons
  94. public static Item LightningSword = new ItemLightningSword(3112, toolLightningWeapons).setUnlocalizedName("LightningSword");
  95.  
  96. //Fire Weapons
  97.  
  98. //Logo
  99. public static Item Logo = new ItemLogo(3111).setUnlocalizedName("Logo");
  100.  
  101. //Entity Registries
  102. public static int entityId = 220;
  103. public static int getEntityId() {
  104.     do {
  105.         entityId++;
  106.     }
  107.     while(EntityList.getStringFromID(entityId)!= null);
  108.     return entityId++;
  109. }
  110.  
  111. //Spawn Eggs
  112. public static void registerSpawnEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor) {
  113.     int eggId = getEntityId();
  114.         EntityList.IDtoClassMapping.put(eggId, entity);
  115.         EntityList.entityEggs.put(eggId, new EntityEggInfo(eggId, primaryColor, secondaryColor));
  116.     }
  117.  
  118. @Init
  119. public void load(FMLInitializationEvent event) {
  120.     proxy.registerRenderInformation();
  121. }
  122.  
  123. public FantasticalFantasyCreatures() {
  124. //Smelting Recipes
  125.  
  126. //Entity Registries
  127. EntityRegistry.registerGlobalEntityID(EntitySnabical.class, "Snabical", 1);
  128. EntityRegistry.addSpawn(Snabical.class, 4, 1, 4, EnumCreatureType.creature);
  129. EntityRegistry.findGlobalUniqueEntityId();
  130. registerSpawnEgg(EntitySnabical.class, 0xFFCCCC, 0xFFFFFF);
  131.  
  132. //Items
  133. LanguageRegistry.addName(Crab, "Crab");
  134. LanguageRegistry.addName(Blubber, "Blubber");
  135. LanguageRegistry.addName(Aqueduck, "Aqueduck");
  136. LanguageRegistry.addName(BearFur, "Bear Fur");
  137. LanguageRegistry.addName(BearasaurusClaw, "Bearasaurus Rex Claw");
  138. LanguageRegistry.addName(FrogEye, "Canadian Tropical Rainforest Treefrog Eye");
  139. LanguageRegistry.addName(FrogSkin, "Canadian Tropical Rainforest Treefrog Skin");
  140. LanguageRegistry.addName(Tangerine, "Tangerine");
  141. LanguageRegistry.addName(TangerineShell, "Tangerine Shell");
  142. LanguageRegistry.addName(CookedCrab, "Cooked Crab");
  143. LanguageRegistry.addName(CookedAqueduck, "Cooked Aqueduck");
  144.  
  145. //Blocks
  146. GameRegistry.registerBlock(TangerineLeaf);
  147. LanguageRegistry.addName(TangerineLeaf, "Tangerine Tree Leaves");
  148. GameRegistry.registerBlock(TangerineWood);
  149. LanguageRegistry.addName(TangerineWood, "Tangerine Tree Wood");
  150. GameRegistry.registerBlock(TangerineGrass);
  151. LanguageRegistry.addName(TangerineGrass, "Tangerine Grass");
  152. GameRegistry.registerBlock(TangerinePlanks);
  153. LanguageRegistry.addName(TangerinePlanks, "Tangerine Wood Planks");
  154.  
  155. //Biome
  156. GameRegistry.addBiome(TangerineBiome);
  157. //Fancy Stuff
  158. GameRegistry.registerWorldGenerator(treeManager);
  159. GameRegistry.registerFuelHandler(new FuelHandler());
  160. //Weapon Registry
  161. LanguageRegistry.addName(LightningSword, "Lightning Blade");
  162. }
  163. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement