Guest User

Crystalia Code

a guest
Apr 21st, 2013
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.03 KB | None | 0 0
  1. package mods.crystalia.common;
  2.  
  3.  
  4. import java.lang.reflect.Proxy;
  5.  
  6. import net.minecraft.block.Block;
  7. import net.minecraft.block.material.Material;
  8. import net.minecraft.item.EnumArmorMaterial;
  9. import net.minecraft.item.EnumToolMaterial;
  10. import net.minecraft.item.Item;
  11. import net.minecraft.item.ItemArmor;
  12. import net.minecraft.item.ItemStack;
  13. import net.minecraftforge.common.EnumHelper;
  14. import cpw.mods.fml.common.Mod;
  15. import cpw.mods.fml.common.Mod.Init;
  16. import cpw.mods.fml.common.SidedProxy;
  17. import cpw.mods.fml.common.event.FMLInitializationEvent;
  18. import cpw.mods.fml.common.network.NetworkMod;
  19. import cpw.mods.fml.common.registry.GameRegistry;
  20. import cpw.mods.fml.common.registry.LanguageRegistry;
  21.  
  22. @Mod(modid = "Crystalia", name = "Crystalia", version = "Pre-Alpha 0.0.3")
  23. @NetworkMod(clientSideRequired = true, serverSideRequired = false)
  24. public class Crystalia {
  25.  
  26.     @SidedProxy(clientSide = "mods.crystalia.common.ClientProxy", serverSide = "mods.crystalia.common.ServerProxy")
  27.     public static ServerProxy proxy;
  28.    
  29.    
  30.     //Blocks start here
  31.     public static Block baconiteOre;
  32.     int baconiteOreID = 3000;
  33.    
  34.     public static Block sapphireOre;
  35.     int sapphireOreID = 3001;
  36. //Items start here 
  37.     public static Item baconiteIngot;
  38.     public static Item cloth;
  39.     public static Item blueCloth;
  40.     public static Item greenCloth;
  41.     public static Item redCloth;
  42.     public static Item yellowCloth;
  43.     public static Item brownCloth;
  44.     public static Item blackCloth;
  45.     public static Item sapphire;
  46.     public static Item ruby;
  47.     //tools start here
  48.     public static Item baconiteBow;
  49.     public static Item pickBaconite;
  50.     public static Item axeBaconite;
  51.     public static Item swordBaconite;
  52.     public static Item hoeBaconite;
  53.     public static Item shovelBaconite;
  54.     //armor starts here
  55.     public static Item baconiteHelmet;
  56.     public static Item baconiteChestplate;
  57.     public static Item baconiteLeggings;
  58.     public static Item baconiteBoots;
  59.    
  60.    
  61.     @Init
  62.     public void load(FMLInitializationEvent event){
  63.         proxy.registerRenderThings();
  64.        
  65.         baconiteOre = new BlockBaconiteOre(baconiteOreID, Material.iron).setUnlocalizedName("tilebaconiteore").setHardness(3.0F);
  66.         sapphireOre = new BlockSapphireOre(sapphireOreID, Material.iron).setUnlocalizedName("tilesapphireore").setHardness(3.0F);
  67.        
  68.        
  69.        
  70.         GameRegistry.registerWorldGenerator(new WorldGeneratorCrystalia());
  71.  
  72.     GameRegistry.registerBlock(baconiteOre, "baconiteore");
  73.     GameRegistry.registerBlock(sapphireOre, "sapphireore");
  74.  
  75.             LanguageRegistry.addName(baconiteOre, "Baconite Ore");
  76.             LanguageRegistry.addName(sapphireOre, "Sapphire Ore");
  77.            
  78.            
  79.             baconiteIngot = new ItemBaconiteIngot(5000).setUnlocalizedName("baconiteIngot");
  80.             LanguageRegistry.addName(baconiteIngot, "Baconite Ingot");
  81.             sapphire = new ItemSapphire(5008).setUnlocalizedName("sapphire");
  82.             LanguageRegistry.addName(sapphire, "Sapphire");
  83.             ruby = new ItemRuby(5016).setUnlocalizedName("ruby");
  84.             LanguageRegistry.addName(ruby, "Ruby");
  85.             //cloth starts here. SO MUCH CLOTH!!!
  86.             redCloth = new ItemRedCloth(5004).setUnlocalizedName("redCloth");
  87.             cloth = new ItemCloth(5001).setUnlocalizedName("cloth");
  88.             greenCloth = new ItemGreenCloth(5003).setUnlocalizedName("greenCloth");
  89.             blueCloth = new ItemBlueCloth(5002).setUnlocalizedName("blueCloth");
  90.             yellowCloth = new ItemYellowCloth(5005).setUnlocalizedName("yellowCloth");
  91.             blackCloth = new ItemBlackCloth(5006).setUnlocalizedName("blackCloth");
  92.             brownCloth = new ItemBrownCloth(5007).setUnlocalizedName("brownCloth");
  93.            
  94.            
  95.             LanguageRegistry.addName(cloth, "Cloth");
  96.             LanguageRegistry.addName(blueCloth, "Blue Cloth");
  97.             LanguageRegistry.addName(greenCloth, "Green Cloth");
  98.             LanguageRegistry.addName(redCloth, "Red Cloth");
  99.             LanguageRegistry.addName(yellowCloth, "Yellow Cloth");
  100.             LanguageRegistry.addName(blackCloth, "Black Cloth");
  101.             LanguageRegistry.addName(brownCloth, "Brown Cloth");
  102.    
  103.     //Smelting!!
  104.             GameRegistry.addSmelting(baconiteOreID, new ItemStack (baconiteIngot), 0.1f);
  105.     //Crafting
  106.     GameRegistry.addRecipe(new ItemStack(baconiteChestplate, 1), new Object[] {
  107.         "T T", "TTT", "TTT", 'T', baconiteIngot
  108.     });
  109.            
  110.        
  111.        
  112.        
  113.     //tools
  114.     baconiteBow = new BaconiteBow(5010).setUnlocalizedName("Crystalia:baconiteBow");
  115.     LanguageRegistry.addName(baconiteBow, "Baconite Bow");
  116.    
  117.     EnumToolMaterial BACONITE = EnumHelper.addToolMaterial("Baconite Enum", 3, 2000, 7.0F, 4, 15);
  118.     EnumArmorMaterial BACONITEA = EnumHelper.addArmorMaterial("Baconite Armor", 40, new int[]{3, 8, 6, 3}, 15);
  119.    
  120.     pickBaconite = new PickaxeBaconite(5011, BACONITE).setUnlocalizedName("crystalia:pickaxeBaconite");
  121.     LanguageRegistry.addName(pickBaconite, "Baconite Pickaxe");
  122.    
  123.     axeBaconite = new AxeBaconite(5012, BACONITE).setUnlocalizedName("crystalia:hatchetBaconite");
  124.     LanguageRegistry.addName(axeBaconite, "Baconite Axe");
  125.    
  126.     hoeBaconite = new HoeBaconite(5013, BACONITE).setUnlocalizedName("crystalia:hoeBaconite");
  127.     LanguageRegistry.addName(hoeBaconite, "Baconite Hoe");
  128.    
  129.     shovelBaconite = new ShovelBaconite(5014, BACONITE).setUnlocalizedName("crystalia:shovelBaconite");
  130.     LanguageRegistry.addName(shovelBaconite, "Baconite Shovel");
  131.    
  132.     swordBaconite = new SwordBaconite(5015, BACONITE).setUnlocalizedName("crystalia:Baconite Sword");
  133.     LanguageRegistry.addName(swordBaconite, "Baconite Sword");
  134.    
  135.     //armor
  136.    
  137.     baconiteHelmet = new BaconiteArmor(6000, BACONITEA, proxy.addArmor("Baconite"), 0).setUnlocalizedName("BaconiteHelmet");
  138.     LanguageRegistry.addName(baconiteHelmet, "Baconite Helmet");
  139.    
  140.     baconiteChestplate = new BaconiteArmor(6001, BACONITEA, proxy.addArmor("Baconite"), 1).setUnlocalizedName("BaconiteChestplate");
  141.     LanguageRegistry.addName(baconiteChestplate, "Baconite Chestplate");
  142.    
  143.     baconiteLeggings = new BaconiteArmor(6002, BACONITEA, proxy.addArmor("Baconite"), 2).setUnlocalizedName("BaconiteLeggings");
  144.     LanguageRegistry.addName(baconiteLeggings, "Baconite Leggings");
  145.    
  146.     baconiteBoots = new BaconiteArmor(6003, BACONITEA, proxy.addArmor("Baconite"), 3).setUnlocalizedName("BaconiteBoots");
  147.     LanguageRegistry.addName(baconiteBoots, "Baconite Boots");
  148.    
  149.  
  150.     }
  151. }
Advertisement
Add Comment
Please, Sign In to add comment