Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- BUILD INFO:
- dir: code
- target: main.js
- files: 8
- */
- // file: header.js
- //Import
- IMPORT("ToolLib");
- //Functions
- function random(min, max){
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
- // file: materials.js
- ToolAPI.addToolMaterial("realmite", {
- durability: 4000,
- level: 3,
- efficiency: 12,
- damage: 6,
- enchantability: 14
- });
- // file: blocks/ores.js
- //Realmite Ore
- IDRegistry.genBlockID("realmiteOre");
- Block.createBlock("realmiteOre", [{
- name: "Realmite Ore",
- texture: [["realmite_ore", 0]],
- inCreative: true
- }], "opaque");
- ToolAPI.registerBlockMaterial(BlockID.realmiteOre, "stone", 2, true);
- Block.setDestroyTime(BlockID.realmiteOre, 2);
- Block.setDestroyLevel("realmiteOre", 3);
- Callback.addCallback("GenerateChunk", function(chunkX, chunkZ){
- for(var i = 0; i < 16; i++){
- var coords = GenerationUtils.randomCoords(chunkX, chunkZ, 0, 20);
- if(World.getBlockID(coords.x,coords.y,coords.z).id==VanillaBlockID.stone){
- GenerationUtils.generateOre(coords.x, coords.y, coords.z, BlockID.realmiteOre, 0, random(1, 5),true);
- }
- }
- });
- //Rupee Ore
- IDRegistry.genBlockID("rupeeOre");
- Block.createBlock("rupeeOre", [{
- name: "Rupee Ore",
- texture: [["rupee_ore", 0]],
- inCreative: true
- }], "opaque");
- ToolAPI.registerBlockMaterial(BlockID.rupeeOre, "stone", 3, true);
- Block.setDestroyTime(BlockID.rupeeOre, 3);
- Block.setDestroyLevel("rupeeOre", 4);
- Callback.addCallback("GenerateChunk", function(chunkX, chunkZ){
- for(var i = 0; i < 16; i++){
- var coords = GenerationUtils.randomCoords(chunkX, chunkZ, 0, 15);
- if(World.getBlockID(coords.x,coords.y,coords.z).id==VanillaBlockID.stone){
- GenerationUtils.generateOre(coords.x, coords.y, coords.z, BlockID.rupeeOre, 0, random(1, 3),true);
- }
- }
- });
- //Arlemite Ore
- IDRegistry.genBlockID("arlemiteOre");
- Block.createBlock("arlemiteOre", [{
- name: "Arlemite Ore",
- texture: [["arlemite_ore", 0]],
- inCreative: true
- }], "opaque");
- ToolAPI.registerBlockMaterial(BlockID.arlemiteOre, "stone", 2, true);
- Block.setDestroyTime(BlockID.arlemiteOre, 2);
- Block.setDestroyLevel("arlemiteOre", 3);
- Callback.addCallback("GenerateChunk", function(chunkX, chunkZ){
- for(var i = 0; i < 16; i++){
- var coords = GenerationUtils.randomCoords(chunkX, chunkZ, 0, 15);
- if(World.getBlockID(coords.x,coords.y,coords.z).id==VanillaBlockID.stone){
- GenerationUtils.generateOre(coords.x, coords.y, coords.z, BlockID.realmiteOre, 0, random(1, 3),true);
- }
- }
- });
- // file: items/resources/pellets.js
- //Aquatic Pellets
- IDRegistry.genItemID("aquaticPellets");
- Item.createItem("aquaticPellets", "Aquatic Pellets", {name: "aquatic_pellets"});
- //Pure Aquatic Pellets
- IDRegistry.genItemID("pureAquaticPellets");
- Item.createItem("pureAquaticPellets", "Pure Aquatic Pellets", {name: "pure_aquatic_pellets"});
- Recipes.addShaped({id: ItemID.pureAquaticPellets, count: 1, data: 0}, [
- "aaa",
- "aaa",
- "aaa"
- ], ['a', ItemID.aquaticPellets, 0]);
- Item.addCreativeGroup("divinePellets", Translation.translate("Pellets"), [
- ItemID.aquaticPellets,
- ItemID.pureAquaticPellets
- ]);
- // file: items/resources/ingots.js
- //Realmite Ingot
- IDRegistry.genItemID("realmiteIngot");
- Item.createItem("realmiteIngot", "Realmite Ingot", {name: "realmite_ingot"});
- Recipes.addFurnace(BlockID.realmiteOre, ItemID.realmiteIngot, 0);
- //Rupee Ingot
- IDRegistry.genItemID("rupeeIngot");
- Item.createItem("rupeeIngot", "Rupee Ingot", {name: "rupee_ingot"});
- Recipes.addFurnace(BlockID.rupeeOre, ItemID.rupeeIngot, 0);
- //Arlemite Ingot
- IDRegistry.genItemID("arlemiteIngot");
- Item.createItem("arlemiteIngot", "Arlemite Ingot", {name: "arlemite_ingot"});
- Recipes.addFurnace(BlockID.arlemiteOre, ItemID.arlemiteIngot, 0);
- //Aquatic Ingot
- IDRegistry.genItemID("aquaticIngot");
- Item.createItem("aquaticIngot", "Aquatic Ingot", {name: "aquatic_ingot"});
- Recipes.addFurnace(ItemID.pureAquaticPellets, ItemID.aquaticIngot, 0);
- //Shadow Bar
- IDRegistry.genItemID("shadowBar");
- Item.createItem("shadowBar", "Shadow Bar", {name: "shadow_bar"});
- Recipes.addShaped({id: ItemID.shadowBar, count: 1, data: 0}, [
- "ax "
- ], ['a', ItemID.arlemiteIngot, 0, 'x', ItemID.rupeeIngot, 0]);
- //Hellstone Ingot
- IDRegistry.genItemID("hellstoneIngot");
- Item.createItem("hellstoneIngot", "Hellstone ingot", {name: "hellstone_ingot"});
- Recipes.addShaped({id: ItemID.hellstoneIngot, count: 1, data: 0}, [
- "ax "
- ], ['a', ItemID.shadowBar, 0, 'x', ItemID.netheriteChank, 0]);
- //Netherite Ingot
- IDRegistry.genItemID("netheriteIngot");
- Item.createItem("netheriteIngot", "Netherite Ingot", {name: "netherite_ingot"});
- Recipes.addFurnace(BlockID.netheriteOre, ItemID.netheritengot, 0);
- Item.addCreativeGroup("divineIngots", Translation.translate("Ingots"), [
- ItemID.realmiteIngot,
- ItemID.rupeeIngot,
- ItemID.arlemiteIngot,
- ItemID.aquaticIngot,
- ItemID.shadowBar,
- ItemID.hellstoneIngot
- ]);
- // file: items/tools/realmite.js
- IDRegistry.genItemID("realmitePickaxe");
- IDRegistry.genItemID("realmiteAxe");
- IDRegistry.genItemID("realmiteHoe");
- IDRegistry.genItemID("realmiteShovel");
- Item.createItem("realmitePickaxe", "Realmite Pickaxe", {name: "realmite_pickaxe", meta: 0}, {stack: 1});
- Item.createItem("realmiteAxe", "Realmite Axe", {name: "realmite_axe", meta: 0}, {stack: 1});
- Item.createItem("realmiteHoe", "Realmite Hoe", {name: "realmite_hoe", meta: 0}, {stack: 1});
- Item.createItem("realmiteShovel", "Realmite Shovel", {name: "realmite_shovel", meta: 0}, {stack: 1});
- ToolLib.setTool(ItemID.realmitePickaxe, "realmite", ToolType.pickaxe);
- ToolLib.setTool(ItemID.realmiteAxe, "realmite", ToolType.axe);
- ToolLib.setTool(ItemID.realmiteHoe, "realmite", ToolType.hoe);
- ToolLib.setTool(ItemID.realmiteShovel, "realmite", ToolType.shovel);
- Item.addRepairItemIds(ItemID.realmitePickaxe, [ItemID.realmiteIngot]);
- Item.addRepairItemIds(ItemID.realmiteAxe, [ItemID.realmiteIngot]);
- Item.addRepairItemIds(ItemID.realmiteHoe, [ItemID.realmiteIngot]);
- Item.addRepairItemIds(ItemID.realmiteShovel, [ItemID.realmiteIngot]);
- Recipes.addShaped({id: ItemID.realmitePickaxe, count: 1, data: 0}, [
- "aaa",
- " x ",
- " x "
- ], ['x', 280, 0, 'a', ItemID.realmiteIngot, 0]);
- Recipes.addShaped({id: ItemID.realmiteAxe, count: 1, data: 0}, [
- " aa",
- " xa",
- " x "
- ], ['x', 280, 0, 'a', ItemID.realmiteIngot, 0]);
- Recipes.addShaped({id: ItemID.realmiteHoe, count: 1, data: 0}, [
- " aa",
- " x ",
- " x "
- ], ['x', 280, 0, 'a', ItemID.realmiteIngot, 0]);
- Recipes.addShaped({id: ItemID.realmiteShovel, count: 1, data: 0}, [
- " a ",
- " x ",
- " x "
- ], ['x', 280, 0, 'a', ItemID.realmiteIngot, 0]);
- // file: items/food/ingredients.js
- IDRegistry.genItemID("tomato");
- Item.createFoodItem("tomato", "Tomato", {name: "tomato"}, {food: 4});
- // file: armor/main.js
-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement