SHARE
TWEET

Yuval main class

a guest May 25th, 2014 209 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Yuval.common;
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. import net.minecraft.block.Block;
  10. import net.minecraft.block.material.Material;
  11. import net.minecraft.creativetab.CreativeTabs;
  12. import net.minecraft.entity.EnumCreatureType;
  13. import net.minecraft.init.Blocks;
  14. import net.minecraft.init.Items;
  15. import net.minecraft.item.Item;
  16. import net.minecraft.item.Item.ToolMaterial;
  17. import net.minecraft.item.ItemStack;
  18. import net.minecraftforge.common.util.EnumHelper;
  19. import Yuval.block.AmberOre;
  20. import Yuval.block.AmethO;
  21. import Yuval.block.Crystalizer;
  22. import Yuval.block.JadeBlock;
  23. import Yuval.block.OnyxB;
  24. import Yuval.block.OnyxO;
  25. import Yuval.block.RedstoneBlock;
  26. import Yuval.block.blockRainbowCrystal;
  27. import Yuval.block.gui.CrystalGuiHadnler;
  28. import Yuval.block.tileentity.CrystalizerTileEntity;
  29. import Yuval.block.tileentity.TileEntityRainbowCrystal;
  30. import Yuval.block.worldgeneration.AmberOreWG;
  31. import Yuval.block.worldgeneration.AmethystWG;
  32. import Yuval.block.worldgeneration.JadeOreWG;
  33. import Yuval.block.worldgeneration.OnyxOreWG;
  34. import Yuval.creativetab.Modtab;
  35. import Yuval.creativetab.placeholder.ModtabPlaceHolder;
  36. import Yuval.item.AmberAxe;
  37. import Yuval.item.AmberHoe;
  38. import Yuval.item.AmberPickaxe;
  39. import Yuval.item.AmberShovel;
  40. import Yuval.item.AmberSword;
  41. import Yuval.item.Amberi;
  42. import Yuval.item.AmethShard;
  43. import Yuval.item.Amethi;
  44. import Yuval.item.Cdiamond;
  45. import Yuval.item.JadeAxe;
  46. import Yuval.item.JadeHoe;
  47. import Yuval.item.JadePickaxe;
  48. import Yuval.item.JadeShovel;
  49. import Yuval.item.JadeSword;
  50. import Yuval.item.Jadei;
  51. import Yuval.item.LCore;
  52. import Yuval.item.LGem;
  53. import Yuval.item.OnyxA;
  54. import Yuval.item.OnyxH;
  55. import Yuval.item.OnyxP;
  56. import Yuval.item.OnyxSh;
  57. import Yuval.item.OnyxSword;
  58. import Yuval.item.Onyxi;
  59. import Yuval.item.RainbowCrystal;
  60. import Yuval.item.Rcore;
  61. import Yuval.item.Rdie;
  62. import Yuval.item.ReCore;
  63. import Yuval.item.ReGem;
  64. import Yuval.mob.entity.EntityRainbowWiredow;
  65. import cpw.mods.fml.common.Mod;
  66. import cpw.mods.fml.common.Mod.EventHandler;
  67. import cpw.mods.fml.common.Mod.Instance;
  68. import cpw.mods.fml.common.SidedProxy;
  69. import cpw.mods.fml.common.event.FMLInitializationEvent;
  70. import cpw.mods.fml.common.network.NetworkRegistry;
  71. import cpw.mods.fml.common.registry.EntityRegistry;
  72. import cpw.mods.fml.common.registry.GameRegistry;
  73.  
  74. @Mod(modid = Yuvalmod.modid, name = "Yuval", version = "ALPHA 1.0")
  75.  
  76.  
  77. public class Yuvalmod
  78. {
  79.         public static final String modid = "Yuvalmod";
  80.        
  81.        
  82.         @SidedProxy(clientSide = "Yuval.common.ClientProxy", serverSide = "Yuval.common.CommonProxy")
  83.     public static CommonProxy proxy;
  84.        
  85.         @Instance("Yuvalmod")
  86.         public static Yuvalmod instance;
  87.        
  88.        
  89.  
  90.        
  91.        
  92.        
  93.         public static JadeOreWG worldgen1=new JadeOreWG();
  94.         public static AmberOreWG worldgen2=new AmberOreWG();
  95.         public static OnyxOreWG worldgen3=new OnyxOreWG();
  96.         public static AmethystWG worldgen4=new AmethystWG();
  97.        
  98.         public static ToolMaterial Jade = EnumHelper.addToolMaterial("JADE", 4, 2000, 6F, 5, 10);
  99.         public static ToolMaterial Amber = EnumHelper.addToolMaterial("AMBER",3, 1700, 5.5F, 4, 10);
  100.         public static ToolMaterial Onyx = EnumHelper.addToolMaterial("ONYX", 5, 2250, 6.5F, 6, 10);
  101.        
  102.        
  103.        
  104.         public static CreativeTabs Modtab=new Modtab(CreativeTabs.getNextID(), "RCMtab" );
  105.         public static Item ModtabPlaceHolder=new ModtabPlaceHolder(3024).setUnlocalizedName("ModtabPlaceHolder").setTextureName("Yuvalmod:Rainbowcrystal");
  106.        
  107.         public static Block AmberOre=new  AmberOre(3009, Material.rock).setBlockName("AmberOre").setBlockTextureName("Yuvalmod:Amberore");
  108.         public static Block JadeBlock=new JadeBlock(3005, Material.rock).setBlockName("Jade Block").setBlockTextureName("Yuvalmod:Jadeblock");
  109.         public static Block RedstoneBlock = new RedstoneBlock(3000, Material.rock).setBlockName("Jade Ore").setBlockTextureName("Yuvalmod:Jadeore");
  110.         public static Block OnyxO=new OnyxO(3020,Material.rock).setBlockName("OnyxO").setBlockTextureName("Yuvalmod:onixOre");
  111.         public static Block OnyxB=new OnyxB(3024,Material.rock).setBlockName("OnyxB").setBlockTextureName("Yuvalmod:Onixblock");
  112.         public static Block AmethO=new AmethO(3025, Material.rock).setBlockName("AmethO").setBlockTextureName("Yuvalmod:Amethystore");
  113.         public static Block Crystalizer=new Crystalizer(3031, Material.iron).setBlockName("Crystalizer").setBlockTextureName("Yuvalmod:Crystalizer");
  114.         public static Block blockRainbowCrystal = new blockRainbowCrystal(Material.glass).setBlockName("RainbowCrystal").setBlockTextureName("");
  115.        
  116.        
  117.        
  118.         public static Item Amethi=new Amethi(3027).setUnlocalizedName("Amethi").setTextureName("Yuvalmod:amethyst");
  119.         public static Item JadePickaxe=new JadePickaxe(3001, Jade).setUnlocalizedName("Jade Pickaxe").setTextureName("Yuvalmod:Pickaxejade");
  120.         public static Item JadeSword=new JadeSword(3002, Jade).setUnlocalizedName("Jade Sword").setTextureName("Yuvalmod:Swordjade");
  121.         public static Item JadeAxe=new JadeAxe(Jade).setUnlocalizedName("Jade Axe").setTextureName("Yuvalmod:Axejade");
  122.         public static Item JadeShovel=new JadeShovel(3004, Jade).setUnlocalizedName("Jade Shovel").setTextureName("Yuvalmod:Shoveljade");
  123.         public static Item JadeHoe=new JadeHoe(Jade).setUnlocalizedName("Jade Hoe").setTextureName("Yuvalmod:Hoejade");
  124.         public static Item Jadei=new Jadei(3006).setUnlocalizedName("Jade").setTextureName("Yuvalmod:jade");
  125.         public static Item RainbowCrystal=new RainbowCrystal(3007).setUnlocalizedName("RainbowCrystal").setTextureName("Yuvalmod:Rainbowcrystal");
  126.         public static Item Amberi=new Amberi(3008).setUnlocalizedName("Amber").setTextureName("Yuvalmod:Amber");
  127.         public static Item AmberPickaxe=new AmberPickaxe(3001, Amber).setUnlocalizedName("Amber Pickaxe").setTextureName("Yuvalmod:Pickaxeamber");
  128.         public static Item Cdiamond=new Cdiamond(3010).setUnlocalizedName("ComprasedDiamond").setTextureName("Yuvalmod:compressedDiamond");
  129.         public static Item Rdie=new Rdie(3011).setUnlocalizedName("Rdie").setTextureName("Yuvalmod:rainbowDye");
  130.         public static Item Rcore=new Rcore(3012).setUnlocalizedName("Rcore").setTextureName("Yuvalmod:RainbowCore");
  131.         public static Item Onyxi=new Onyxi(3013).setUnlocalizedName("Onyxi").setTextureName("Yuvalmod:onix");
  132.         public static Item AmberSword=new AmberSword(3014, Amber).setUnlocalizedName("AmberSword").setTextureName("Yuvalmod:Swordamber");
  133.         public static Item AmberAxe=new AmberAxe(Amber).setUnlocalizedName("AmberAxe").setTextureName("Yuvalmod:Axeamber");
  134.         public static Item AmberShovel=new AmberShovel(3016, Amber).setUnlocalizedName("AmberShovel").setTextureName("Yuvalmod:Shovelamber");
  135.         public static Item AmberHoe=new AmberHoe(Amber).setUnlocalizedName("AmberHoe").setTextureName("Yuvalmod:Hoeamber");
  136.         public static Item OnyxSword=new OnyxSword(3018,Onyx).setUnlocalizedName("OnyxSword").setTextureName("Yuvalmod:swordOnix");
  137.         public static Item OnyxP=new OnyxP(3019,Onyx).setUnlocalizedName("OnyxP").setTextureName("Yuvalmod:Pickaxeonix");
  138.         public static Item OnyxA=new OnyxA(3021,Onyx).setUnlocalizedName("OnyxA").setTextureName("Yuvalmod:axeonix");
  139.         public static Item OnyxH=new OnyxH(3022,Onyx).setUnlocalizedName("OnyxH").setTextureName("Yuvalmod:hoeonix");
  140.         public static Item OnyxSh=new OnyxSh(3023,Onyx).setUnlocalizedName("OnyxSh").setTextureName("Yuvalmod:shovelOnix");
  141.         public static Item AmethShard=new AmethShard(3026).setUnlocalizedName("AmethShard").setTextureName("Yuvalmod:amethystshard");
  142.         public static Item LGem=new LGem(3027).setUnlocalizedName("LGem").setTextureName("Yuvalmod:Lapis Gem");
  143.         public static Item LCore=new LCore(3028).setUnlocalizedName("LCore").setTextureName("Yuvalmod:Lapis Core");
  144.         public static Item ReGem=new ReGem(3029).setUnlocalizedName("ReGem").setTextureName("Yuvalmod:Redstone Gem");
  145.         public static Item ReCore=new ReCore(3030).setUnlocalizedName("ReCore").setTextureName("Yuvalmod:Redstone Core");
  146.  
  147.  
  148.        
  149.  
  150.        
  151.        
  152.  
  153.        
  154.  
  155.        
  156.        
  157.        
  158.        
  159.        
  160.        
  161.        
  162.  
  163.        
  164.         public Yuvalmod()
  165.         {
  166.                
  167.                 GameRegistry.registerBlock(RedstoneBlock, "Jade Ore");
  168.                 GameRegistry.registerBlock(JadeBlock, "Block of Jade");
  169.                 GameRegistry.registerBlock(OnyxO,  "OnyxO");
  170.                 GameRegistry.registerBlock(AmberOre, "AmberOre");
  171.                 GameRegistry.registerBlock(OnyxB, "OnyxB");
  172.                 GameRegistry.registerBlock(AmethO,"AmethO");
  173.                 GameRegistry.registerBlock(Crystalizer, "Crystalizer");
  174.                 GameRegistry.registerBlock(blockRainbowCrystal, "RainbowCrystal");
  175.                
  176.        
  177.                
  178.                 GameRegistry.registerItem(JadeSword, "Jade Sword");
  179.                 GameRegistry.registerItem(JadeAxe, "Jade Axe");
  180.                 GameRegistry.registerItem(JadeShovel, "Jade Shovel");
  181.                 GameRegistry.registerItem(JadeHoe, "Jade Hoe");
  182.                 GameRegistry.registerItem(JadePickaxe, "Jade Pickaxe");
  183.                 GameRegistry.registerItem(AmberPickaxe, "Amber Pickaxe");
  184.                 GameRegistry.registerItem(AmberSword, "AmberSword");
  185.                 GameRegistry.registerItem(AmberAxe, "AmberAxe");
  186.                 GameRegistry.registerItem(AmberShovel, "AmberShovel");
  187.                 GameRegistry.registerItem(AmberHoe, "AmberHoe");
  188.                 GameRegistry.registerItem(OnyxSword, "OnyxSword");
  189.                 GameRegistry.registerItem(OnyxP, "OnyxP");
  190.             GameRegistry.registerItem(OnyxA, "OnyxA");
  191.                 GameRegistry.registerItem(OnyxH, "OnyxH");
  192.                 GameRegistry.registerItem(OnyxSh, "OnyxSh");
  193.                 GameRegistry.registerItem(ModtabPlaceHolder, "ModtabPlaceHolder");
  194.                 GameRegistry.registerItem(RainbowCrystal, "Rainbow Crystal");
  195.                 GameRegistry.registerItem(Amberi,"Amber");
  196.                 GameRegistry.registerItem(Jadei,"Jade");
  197.                 GameRegistry.registerItem(Cdiamond, "ComprasedDiamond");
  198.                 GameRegistry.registerItem(Rdie, "Rdie");
  199.                 GameRegistry.registerItem(Rcore, "Rcore");
  200.                 GameRegistry.registerItem(Onyxi, "Onyxi");
  201.                 GameRegistry.registerItem(AmethShard, "AmethShard");
  202.                 GameRegistry.registerItem(Amethi, "Amethi");
  203.                 GameRegistry.registerItem(LGem, "LGem");
  204.                 GameRegistry.registerItem(LCore, "LCore");
  205.                 GameRegistry.registerItem(ReGem, "ReGem");
  206.                 GameRegistry.registerItem(ReCore, "ReCore");
  207.                
  208.                 EntityRegistry.registerGlobalEntityID(EntityRainbowWiredow.class, "Rainbow Wiredow", 400, 0xfffffff, 0x0033FF);
  209.                 EntityRegistry.addSpawn(EntityRainbowWiredow.class, 10, 2, 4, EnumCreatureType.monster);
  210.                 EntityRegistry.findGlobalUniqueEntityId();
  211.                
  212.                
  213.                
  214.                
  215.                
  216.                 GameRegistry.registerTileEntity(CrystalizerTileEntity.class, "CrystalizerTileEntity");
  217.                 GameRegistry.registerTileEntity(TileEntityRainbowCrystal.class, "TileEntityRainbowCrystal");
  218.                
  219.                 proxy.registerRenderThings();
  220.                
  221.        
  222.  
  223.                
  224.                 GameRegistry.registerWorldGenerator(worldgen1, 1);
  225.                 GameRegistry.registerWorldGenerator(worldgen2, 1);
  226.                 GameRegistry.registerWorldGenerator(worldgen3, 1);
  227.                 GameRegistry.registerWorldGenerator(worldgen4, 1);
  228.                
  229.                
  230.                 GameRegistry.addRecipe(new ItemStack(JadePickaxe, 1),new Object[] {
  231.                         "XXX", " * ", " * ", 'X', Jadei, '*', Items.stick
  232.                 });
  233.                 GameRegistry.addRecipe(new ItemStack(JadeSword, 1),new Object[] {
  234.                         " X ", " X ", " * ", 'X', Jadei, '*', Items.stick
  235.                 });
  236.                 GameRegistry.addRecipe(new ItemStack(JadeShovel, 1),new Object[] {
  237.                         " X ", " * ", " * ", 'X', Jadei, '*', Items.stick
  238.                 });
  239.                 GameRegistry.addRecipe(new ItemStack(JadeHoe, 1),new Object[] {
  240.                         "XX ", " * ", " * ", 'X', Jadei, '*', Items.stick
  241.                 });
  242.                 GameRegistry.addRecipe(new ItemStack(JadeAxe, 1),new Object[] {
  243.                         "XX ", "X* ", " * ", 'X', Jadei, '*', Items.stick
  244.                 });
  245.                 GameRegistry.addRecipe(new ItemStack(AmberPickaxe,1),new Object[] {
  246.                         "XXX", " * ", " * ", 'X', Amberi, '*', Items.stick
  247.                 });
  248.                 GameRegistry.addRecipe(new ItemStack(Cdiamond,1),new Object[]{
  249.                         "   ", "ddd", "   ", 'd', Items.diamond
  250.                 });
  251.                 GameRegistry.addRecipe(new ItemStack(Rdie,3),new Object[]{
  252.                         "ROY", "GLP", "   ",'R', new ItemStack(Items.dye, 1, 1), 'O', new ItemStack(Items.dye, 1, 14), 'Y', new ItemStack(Items.dye, 1, 11),
  253.                          'G', new ItemStack(Items.dye, 1, 2), 'L', new ItemStack(Items.dye, 1, 4), 'P', new ItemStack(Items.dye, 1, 5)
  254.                 });
  255.                
  256.                 GameRegistry.addShapelessRecipe(new ItemStack(Rcore,1), new Object[]{
  257.                         Rdie, Cdiamond
  258.                 });
  259.                 GameRegistry.addRecipe(new ItemStack(AmberPickaxe, 1),new Object[] {
  260.                         "XXX", " * ", " * ", 'X', Amberi, '*', Items.stick
  261.                 });
  262.                 GameRegistry.addRecipe(new ItemStack(AmberSword, 1),new Object[] {
  263.                         " X ", " X ", " * ", 'X', Amberi, '*', Items.stick
  264.                 });
  265.                 GameRegistry.addRecipe(new ItemStack(AmberShovel, 1),new Object[] {
  266.                         " X ", " * ", " * ", 'X', Amberi, '*', Items.stick
  267.                 });
  268.                 GameRegistry.addRecipe(new ItemStack(AmberHoe, 1),new Object[] {
  269.                         "XX ", " * ", " * ", 'X', Amberi, '*', Items.stick
  270.                 });
  271.                 GameRegistry.addRecipe(new ItemStack(AmberAxe, 1),new Object[] {
  272.                         "XX ", "X* ", " * ", 'X', Amberi, '*', Items.stick
  273.                 });
  274.                 GameRegistry.addShapelessRecipe(new ItemStack(Jadei,9), new Object[]{
  275.                         JadeBlock
  276.                 });
  277.                 GameRegistry.addRecipe(new ItemStack(JadeBlock, 1),new Object[] {
  278.                         "XXX", "XXX", "XXX", 'X', Jadei
  279.                 });
  280.                 GameRegistry.addRecipe(new ItemStack(OnyxB, 1),new Object[] {
  281.                         "XXX", "XXX", "XXX", 'X', Onyxi
  282.                 });
  283.                 GameRegistry.addRecipe(new ItemStack(Amethi, 1),new Object[] {
  284.                         "XXX", "XXX", "XXX", 'X', AmethShard
  285.                 });
  286.                
  287.                
  288.                
  289.                
  290.                 GameRegistry.addRecipe(new ItemStack(LGem, 1),new Object[] {
  291.                         " X ", "BCB", " X ", 'X', Items.diamond, 'B', Blocks.lapis_block, 'C', LCore
  292.                 });
  293.                 GameRegistry.addRecipe(new ItemStack(ReCore, 1),new Object[] {
  294.                         " X ", "BOB", " X ", 'X', Amberi, 'B', Blocks.redstone_block, 'O', Onyxi
  295.                 });
  296.                 GameRegistry.addRecipe(new ItemStack(ReGem, 1),new Object[] {
  297.                         "RIR", "GCG", "RIR", 'R', Items.redstone, 'G', Items.gold_ingot, 'C', ReCore, 'I', Items.iron_ingot
  298.                 });
  299.                 GameRegistry.addRecipe(new ItemStack(RainbowCrystal, 1),new Object[] {
  300.                         "ArG", "IRJ", "MlO", 'A', Amberi,  'r', ReGem, 'G', Items.gold_ingot, 'R', Rcore, 'I', Items.iron_ingot, 'J', Jadei,
  301.                         'M', Amethi, 'l', LGem, 'O', Onyxi
  302.                 });
  303.                
  304.        
  305.                 GameRegistry.addSmelting(RedstoneBlock, new ItemStack(Jadei), 0.2F);
  306.                
  307.                
  308.                 instance = this;
  309.  
  310.  
  311.                
  312.                
  313.                
  314.                
  315.                
  316.         }
  317.         @EventHandler
  318.         public void load(FMLInitializationEvent event){
  319.                 proxy.RenderInformation();
  320.         }
  321.  
  322.        
  323.        
  324.        
  325.        
  326.        
  327.        
  328.        
  329.        
  330. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top