Guest User

Untitled

a guest
Jun 23rd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. package net.minecraft.src;
  2. import java.util.Map;
  3. import java.util.Random;
  4.  
  5. public class mod_EasterPractel extends BaseMod
  6. {
  7. public static final Block easterEgg1 = new BlockeasterEgg1(159,0).setResistance(15F).setHardness(3F).setLightValue(0.125F).setBlockName("easter1");
  8.  
  9. /*
  10. public static final Item ChristmasPick = new ItemPickaxe(603, EnumToolMaterial.CHRISTMAS).setItemName("ChristmasPick");
  11. public static final Block ChristmasL = new BlockChristmasL(159,0).setResistance(1F).setHardness(2.0F).setBlockName("christmasl");
  12. */
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. public mod_EasterPractel()
  22. {
  23. //ChristmasLBlock
  24. ModLoader.RegisterBlock(easterEgg1);
  25. ModLoader.AddName(easterEgg1,"Green Easter Egg");
  26. easterEgg1.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/easter/easterEgg1.png");
  27. ModLoader.AddRecipe(new ItemStack(easterEgg1,16), new Object[]{
  28. "XXX", "XGX", "XXX",Character.valueOf('X'), Block.planks,Character.valueOf('G'), Block.bedrock
  29. });
  30. /*
  31. //Nutcracker
  32. ModLoader.AddName(Nutcracker, "A Nutcracker");
  33. Nutcracker.iconIndex = ModLoader.addOverride("/gui/items.png","/practel/Nutcracker.png");
  34. ModLoader.AddRecipe(new ItemStack(Nutcracker,0), new Object[]{
  35. "XXX","XXX","XXX",Character.valueOf('X'), Block.waterMoving});
  36. });
  37. //GreenPresent
  38. ModLoader.RegisterBlock(GreenP);
  39. ModLoader.AddName(GreenP,"Green Christmas Present");
  40. GreenP.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/practel/practelblock.png");
  41. ModLoader.AddRecipe(new ItemStack(GreenP,5), new Object[]{
  42. "XXX", "XGX", "XXX",Character.valueOf('X'), Item.slimeBall,Character.valueOf('G'), Block.stone
  43.  
  44. */
  45. }
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. //WorldGen
  53. /*public void GenerateSurface(World world, Random rand, int baseX, int baseZ)
  54. {
  55. for(int x = 0; x < 2; x++)
  56. {
  57. int Xcoord = baseX + rand.nextInt(1);
  58. int Ycoord = rand.nextInt(28);
  59. int Zcoord = baseZ + rand.nextInt(1);
  60. (new WorldGenMinable(ChristmasOre.blockID, 8)).generate(world, rand, Xcoord, Ycoord, Zcoord);
  61. }
  62.  
  63. BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(baseX, baseZ);
  64. WorldGenCTree tree = new WorldGenCTree();
  65. if((biome instanceof BiomeGenPlains) || (biome instanceof BiomeGenForest) || (biome instanceof BiomeGenHills) ||
  66. (biome instanceof BiomeGenDesert) || (biome instanceof BiomeGenSwamp) || (biome instanceof BiomeGenTaiga))
  67. {
  68. for(int x = 0; x < 2; x++)
  69. {
  70. int Xcoord = baseX + rand.nextInt(16);
  71. int Zcoord = baseZ + rand.nextInt(16);
  72. int i = world.getHeightValue(Xcoord, Zcoord);
  73. tree.generate(world, rand, Xcoord, i, Zcoord);
  74. }
  75. }
  76. }
  77.  
  78. public void TakenFromCrafting(EntityPlayer entityplayer, ItemStack itemstack)
  79. {
  80. if(itemstack.itemID == mod_ChristmasTools.GreenP.blockID)
  81. {
  82. entityplayer.addStat(pickUpPresent, 1);
  83. }
  84. }
  85.  
  86.  
  87.  
  88.  
  89. //MobSpawn
  90. public void AddRenderer(Map map)
  91. {
  92. //EvilSanta
  93. map.put(EntityEvilSanta.class, new RenderBiped(new ModelBiped(), 0.5F));
  94. //DarkElf
  95. map.put(EntityDarkElf.class, new RenderBiped(new ModelBiped(), 0.5F));
  96. //Gingerbreadman
  97. map.put(EntityGinger.class, new RenderBiped(new ModelBiped(), 0.5F));
  98. //SnowCreeper
  99. map.put(EntitySnowCreeper.class, new RenderSnowCreeper());
  100. //IceMan
  101. map.put(EntityIceMan.class, new RenderBiped(new ModelBiped(), 0.5F));
  102.  
  103. }
  104.  
  105.  
  106.  
  107.  
  108. */
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152. public String Version()
  153. {
  154. return "EasterPractel";
  155. }
  156.  
  157. @Override
  158. public String getVersion() {
  159. // TODO Auto-generated method stub
  160. return null;
  161. }
  162.  
  163. @Override
  164. public void load() {
  165. // TODO Auto-generated method stub
  166.  
  167. }
  168. }
Add Comment
Please, Sign In to add comment