Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. BUILD INFO:
  3.   dir: code
  4.   target: main.js
  5.   files: 8
  6. */
  7.  
  8.  
  9.  
  10. // file: header.js
  11.  
  12. //Import
  13. IMPORT("ToolLib");
  14.  
  15. //Functions
  16. function random(min, max){
  17. return Math.floor(Math.random() * (max - min + 1)) + min;
  18. }
  19.  
  20.  
  21.  
  22.  
  23. // file: materials.js
  24.  
  25. ToolAPI.addToolMaterial("realmite", {
  26.      durability: 4000,
  27.      level: 3,
  28.      efficiency: 12,
  29.      damage: 6,
  30.      enchantability: 14
  31. });
  32.  
  33.  
  34.  
  35.  
  36. // file: blocks/ores.js
  37.  
  38. //Realmite Ore
  39. IDRegistry.genBlockID("realmiteOre");
  40. Block.createBlock("realmiteOre", [{
  41.      name: "Realmite Ore",
  42.      texture: [["realmite_ore", 0]],
  43.      inCreative: true
  44. }], "opaque");
  45. ToolAPI.registerBlockMaterial(BlockID.realmiteOre, "stone", 2, true);
  46. Block.setDestroyTime(BlockID.realmiteOre, 2);
  47. Block.setDestroyLevel("realmiteOre", 3);
  48.  
  49. Callback.addCallback("GenerateChunk", function(chunkX, chunkZ){
  50. for(var i = 0; i < 16; i++){
  51.      var coords = GenerationUtils.randomCoords(chunkX, chunkZ, 0, 20);
  52.           if(World.getBlockID(coords.x,coords.y,coords.z).id==VanillaBlockID.stone){
  53.                GenerationUtils.generateOre(coords.x, coords.y, coords.z, BlockID.realmiteOre, 0, random(1, 5),true);
  54.           }
  55.      }
  56. });
  57.  
  58. //Rupee Ore
  59. IDRegistry.genBlockID("rupeeOre");
  60. Block.createBlock("rupeeOre", [{
  61.      name: "Rupee Ore",
  62.      texture: [["rupee_ore", 0]],
  63.      inCreative: true
  64. }], "opaque");
  65. ToolAPI.registerBlockMaterial(BlockID.rupeeOre, "stone", 3, true);
  66. Block.setDestroyTime(BlockID.rupeeOre, 3);
  67. Block.setDestroyLevel("rupeeOre", 4);
  68.  
  69. Callback.addCallback("GenerateChunk", function(chunkX, chunkZ){
  70. for(var i = 0; i < 16; i++){
  71.      var coords = GenerationUtils.randomCoords(chunkX, chunkZ, 0, 15);
  72.           if(World.getBlockID(coords.x,coords.y,coords.z).id==VanillaBlockID.stone){
  73.                GenerationUtils.generateOre(coords.x, coords.y, coords.z, BlockID.rupeeOre, 0, random(1, 3),true);
  74.           }
  75.      }
  76. });
  77.  
  78. //Arlemite Ore
  79. IDRegistry.genBlockID("arlemiteOre");
  80. Block.createBlock("arlemiteOre", [{
  81.      name: "Arlemite Ore",
  82.      texture: [["arlemite_ore", 0]],
  83.      inCreative: true
  84. }], "opaque");
  85. ToolAPI.registerBlockMaterial(BlockID.arlemiteOre, "stone", 2, true);
  86. Block.setDestroyTime(BlockID.arlemiteOre, 2);
  87. Block.setDestroyLevel("arlemiteOre", 3);
  88.  
  89. Callback.addCallback("GenerateChunk", function(chunkX, chunkZ){
  90. for(var i = 0; i < 16; i++){
  91.      var coords = GenerationUtils.randomCoords(chunkX, chunkZ, 0, 15);
  92.           if(World.getBlockID(coords.x,coords.y,coords.z).id==VanillaBlockID.stone){
  93.                GenerationUtils.generateOre(coords.x, coords.y, coords.z, BlockID.realmiteOre, 0, random(1, 3),true);
  94.           }
  95.      }
  96. });
  97.  
  98.  
  99.  
  100.  
  101. // file: items/resources/pellets.js
  102.  
  103. //Aquatic Pellets
  104. IDRegistry.genItemID("aquaticPellets");
  105. Item.createItem("aquaticPellets", "Aquatic Pellets", {name: "aquatic_pellets"});
  106.  
  107. //Pure Aquatic Pellets
  108. IDRegistry.genItemID("pureAquaticPellets");
  109. Item.createItem("pureAquaticPellets", "Pure Aquatic Pellets", {name: "pure_aquatic_pellets"});
  110. Recipes.addShaped({id: ItemID.pureAquaticPellets, count: 1, data: 0}, [
  111.  "aaa",
  112.  "aaa",
  113.  "aaa"
  114. ], ['a', ItemID.aquaticPellets, 0]);
  115.  
  116. Item.addCreativeGroup("divinePellets", Translation.translate("Pellets"), [
  117.      ItemID.aquaticPellets,
  118.      ItemID.pureAquaticPellets
  119. ]);
  120.  
  121.  
  122.  
  123.  
  124. // file: items/resources/ingots.js
  125.  
  126. //Realmite Ingot
  127. IDRegistry.genItemID("realmiteIngot");
  128. Item.createItem("realmiteIngot", "Realmite Ingot", {name: "realmite_ingot"});
  129. Recipes.addFurnace(BlockID.realmiteOre, ItemID.realmiteIngot, 0);
  130.  
  131. //Rupee Ingot
  132. IDRegistry.genItemID("rupeeIngot");
  133. Item.createItem("rupeeIngot", "Rupee Ingot", {name: "rupee_ingot"});
  134. Recipes.addFurnace(BlockID.rupeeOre, ItemID.rupeeIngot, 0);
  135.  
  136. //Arlemite Ingot
  137. IDRegistry.genItemID("arlemiteIngot");
  138. Item.createItem("arlemiteIngot", "Arlemite Ingot", {name: "arlemite_ingot"});
  139. Recipes.addFurnace(BlockID.arlemiteOre, ItemID.arlemiteIngot, 0);
  140.  
  141. //Aquatic Ingot
  142. IDRegistry.genItemID("aquaticIngot");
  143. Item.createItem("aquaticIngot", "Aquatic Ingot", {name: "aquatic_ingot"});
  144. Recipes.addFurnace(ItemID.pureAquaticPellets, ItemID.aquaticIngot, 0);
  145.  
  146. //Shadow Bar
  147. IDRegistry.genItemID("shadowBar");
  148. Item.createItem("shadowBar", "Shadow Bar", {name: "shadow_bar"});
  149. Recipes.addShaped({id: ItemID.shadowBar, count: 1, data: 0}, [
  150.  "ax "
  151. ], ['a', ItemID.arlemiteIngot, 0, 'x', ItemID.rupeeIngot, 0]);
  152.  
  153. //Hellstone Ingot
  154. IDRegistry.genItemID("hellstoneIngot");
  155. Item.createItem("hellstoneIngot", "Hellstone ingot", {name: "hellstone_ingot"});
  156. Recipes.addShaped({id: ItemID.hellstoneIngot, count: 1, data: 0}, [
  157.  "ax "
  158. ], ['a', ItemID.shadowBar, 0, 'x', ItemID.netheriteChank, 0]);
  159.  
  160. //Netherite Ingot
  161. IDRegistry.genItemID("netheriteIngot");
  162. Item.createItem("netheriteIngot", "Netherite Ingot", {name: "netherite_ingot"});
  163. Recipes.addFurnace(BlockID.netheriteOre, ItemID.netheritengot, 0);
  164.  
  165. Item.addCreativeGroup("divineIngots", Translation.translate("Ingots"), [
  166.      ItemID.realmiteIngot,
  167.      ItemID.rupeeIngot,
  168.      ItemID.arlemiteIngot,
  169.      ItemID.aquaticIngot,
  170.      ItemID.shadowBar,
  171.      ItemID.hellstoneIngot
  172. ]);
  173.  
  174.  
  175.  
  176.  
  177. // file: items/tools/realmite.js
  178.  
  179. IDRegistry.genItemID("realmitePickaxe");
  180. IDRegistry.genItemID("realmiteAxe");
  181. IDRegistry.genItemID("realmiteHoe");
  182. IDRegistry.genItemID("realmiteShovel");
  183.  
  184. Item.createItem("realmitePickaxe", "Realmite Pickaxe", {name: "realmite_pickaxe", meta: 0}, {stack: 1});
  185. Item.createItem("realmiteAxe", "Realmite Axe", {name: "realmite_axe", meta: 0}, {stack: 1});
  186. Item.createItem("realmiteHoe", "Realmite Hoe", {name: "realmite_hoe", meta: 0}, {stack: 1});
  187. Item.createItem("realmiteShovel", "Realmite Shovel", {name: "realmite_shovel", meta: 0}, {stack: 1});
  188.  
  189. ToolLib.setTool(ItemID.realmitePickaxe, "realmite", ToolType.pickaxe);
  190. ToolLib.setTool(ItemID.realmiteAxe, "realmite", ToolType.axe);
  191. ToolLib.setTool(ItemID.realmiteHoe, "realmite", ToolType.hoe);
  192. ToolLib.setTool(ItemID.realmiteShovel, "realmite", ToolType.shovel);
  193.  
  194.  
  195. Item.addRepairItemIds(ItemID.realmitePickaxe, [ItemID.realmiteIngot]);
  196. Item.addRepairItemIds(ItemID.realmiteAxe, [ItemID.realmiteIngot]);
  197. Item.addRepairItemIds(ItemID.realmiteHoe, [ItemID.realmiteIngot]);
  198. Item.addRepairItemIds(ItemID.realmiteShovel, [ItemID.realmiteIngot]);
  199.  
  200. Recipes.addShaped({id: ItemID.realmitePickaxe, count: 1, data: 0}, [
  201.  "aaa",
  202.  " x ",
  203.  " x "
  204. ], ['x', 280, 0, 'a', ItemID.realmiteIngot, 0]);
  205. Recipes.addShaped({id: ItemID.realmiteAxe, count: 1, data: 0}, [
  206.  " aa",
  207.  " xa",
  208.  " x "
  209. ], ['x', 280, 0, 'a', ItemID.realmiteIngot, 0]);
  210. Recipes.addShaped({id: ItemID.realmiteHoe, count: 1, data: 0}, [
  211.  " aa",
  212.  " x ",
  213.  " x "
  214. ], ['x', 280, 0, 'a', ItemID.realmiteIngot, 0]);
  215. Recipes.addShaped({id: ItemID.realmiteShovel, count: 1, data: 0}, [
  216.  " a ",
  217.  " x ",
  218.  " x "
  219. ], ['x', 280, 0, 'a', ItemID.realmiteIngot, 0]);
  220.  
  221.  
  222.  
  223.  
  224. // file: items/food/ingredients.js
  225.  
  226. IDRegistry.genItemID("tomato");
  227. Item.createFoodItem("tomato", "Tomato", {name: "tomato"}, {food: 4});
  228.  
  229.  
  230.  
  231.  
  232. // file: armor/main.js
  233.  
  234. 
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement