trilithiumCrystal = register(new MOBaseItem("trilithium_crystal")); quantumFoldManipulator = register(new MOBaseItem("quantum_fold_manipulator")); Preconditions.checkNotNull(TOOL_MATERIAL_TRITANIUM).setRepairItem(new ItemStack(tritanium_ingot)); Preconditions.checkNotNull(ARMOR_MATERIAL_TRITANIUM).setRepairItem(new ItemStack(tritanium_ingot)); MOLog.info("Finished registering items");
ModItems.blindfoldArmor.setRepairItem(new ItemStack(Items.STRING)); ModItems.silverMetal.setRepairItem(new ItemStack(ModItems.silverIngot)); ModItems.silverTools.setRepairItem(new ItemStack(ModItems.silverIngot)); ModItems.boneTools.setRepairItem(new ItemStack(ModItems.dragonbone)); ModItems.fireBoneTools.setRepairItem(new ItemStack(ModItems.dragonbone)); ModItems.iceBoneTools.setRepairItem(new ItemStack(ModItems.dragonbone)); for(EnumDragonArmor armor : EnumDragonArmor.values()){ armor.armorMaterial.setRepairItem(new ItemStack(EnumDragonArmor.getScaleItem(armor))); ModItems.white_deathworm.setRepairItem(new ItemStack(ModItems.deathworm_chitin, 1, 1)); ModItems.red_deathworm.setRepairItem(new ItemStack(ModItems.deathworm_chitin, 1, 2)); ModItems.trollWeapon.setRepairItem(new ItemStack(Blocks.STONE)); ModItems.troll_mountain.setRepairItem(new ItemStack(EnumTroll.MOUNTAIN.leather)); ModItems.troll_forest.setRepairItem(new ItemStack(EnumTroll.FOREST.leather));
private static void registerEmeraldMaterial() { MaterialRegistry.emeraldArmorMaterial = EnumHelper.addArmorMaterial(emeraldName, Const.MODRES + emeraldName, diamondDurability + 30, //was -2 affects DURABILITY new int[] { ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.FEET), ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.LEGS), ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.CHEST), ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.HEAD) }, ArmorMaterial.GOLD.getEnchantability(), ArmorMaterial.DIAMOND.getSoundEvent(), ArmorMaterial.DIAMOND.getToughness() + 1);//was / 2 MaterialRegistry.emeraldArmorMaterial.repairMaterial = new ItemStack(Items.EMERALD); //max uses is durability ex The number of uses this material allows. //as of 1.9.4 : (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32) MaterialRegistry.emeraldToolMaterial = EnumHelper.addToolMaterial(emeraldName, ToolMaterial.DIAMOND.getHarvestLevel(), ToolMaterial.DIAMOND.getMaxUses(), //was - 261 ToolMaterial.DIAMOND.getEfficiency(), ToolMaterial.DIAMOND.getAttackDamage(), //was - 0.25F ToolMaterial.GOLD.getEnchantability()); MaterialRegistry.emeraldToolMaterial.setRepairItem(MaterialRegistry.emeraldArmorMaterial.repairMaterial); }
private static void registerPurpleMaterial() { ArmorMaterial mimicArmor = ArmorMaterial.DIAMOND; MaterialRegistry.powerArmorMaterial = EnumHelper.addArmorMaterial(MATERIALNAME, Const.MODRES + MATERIALNAME, diamondDurability * 2, // affects DURABILITY . 15 is the same as iron new int[] { mimicArmor.getDamageReductionAmount(EntityEquipmentSlot.FEET) + 1, mimicArmor.getDamageReductionAmount(EntityEquipmentSlot.LEGS) + 1, mimicArmor.getDamageReductionAmount(EntityEquipmentSlot.CHEST) + 1, mimicArmor.getDamageReductionAmount(EntityEquipmentSlot.HEAD) + 2 }, mimicArmor.getEnchantability() / 4, mimicArmor.getSoundEvent(), mimicArmor.getToughness() + 2); MaterialRegistry.powerArmorMaterial.repairMaterial = new ItemStack(Blocks.OBSIDIAN); //now the tool material MaterialRegistry.powerToolMaterial = EnumHelper.addToolMaterial(MATERIALNAME, ToolMaterial.DIAMOND.getHarvestLevel(), ToolMaterial.DIAMOND.getMaxUses() * 4, //was - 261 ToolMaterial.DIAMOND.getEfficiency(), ToolMaterial.DIAMOND.getAttackDamage() * 8, //best draconic evolution sword is 35 base, so this is not that crazy ToolMaterial.GOLD.getEnchantability() * 2); MaterialRegistry.powerToolMaterial.setRepairItem(MaterialRegistry.powerArmorMaterial.repairMaterial); }
@SubscribeEvent public static void registerRecipes(RegistryEvent.Register<IRecipe> event) { for (int i = 0; i < ItemSoulGem.names.length; i++) { for (EnumDemonWillType willType : EnumDemonWillType.values()) { ItemStack baseGemStack = new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, i); ItemStack newGemStack = new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, i); ((ItemSoulGem) RegistrarBloodMagicItems.SOUL_GEM).setCurrentType(willType, newGemStack); ShapelessOreRecipe shapeless = new ShapelessOreRecipe(new ResourceLocation(BloodMagic.MODID, "soul_gem"), newGemStack, baseGemStack, willType.getStack()); event.getRegistry().register(shapeless.setRegistryName("soul_gem_" + willType.getName())); } } OreDictionary.registerOre("dustIron", ComponentTypes.SAND_IRON.getStack()); OreDictionary.registerOre("dustGold", ComponentTypes.SAND_GOLD.getStack()); OreDictionary.registerOre("dustCoal", ComponentTypes.SAND_COAL.getStack()); PluginUtil.handlePluginStep(PluginUtil.RegistrationStep.RECIPE_REGISTER); RegistrarBloodMagicItems.SOUL_TOOL_MATERIAL.setRepairItem(EnumDemonWillType.DEFAULT.getStack()); }
/** * Netherbrick is between stone and iron, still with stone harvest level */ private static void registerNetherMaterials() { MaterialRegistry.netherToolMaterial = EnumHelper.addToolMaterial("nether", ToolMaterial.STONE.getHarvestLevel(), (ToolMaterial.STONE.getMaxUses() + ToolMaterial.IRON.getMaxUses()) / 2, (ToolMaterial.STONE.getEfficiency() + //halfway in between ToolMaterial.IRON.getEfficiency()) / 2, ToolMaterial.IRON.getAttackDamage(), ToolMaterial.GOLD.getEnchantability()); MaterialRegistry.netherToolMaterial.setRepairItem(new ItemStack(Items.NETHERBRICK)); } }
/** * Sandstone is between wood and stone, with stone harvest level */ private static void registerSandstoneMaterials() { MaterialRegistry.sandstoneToolMaterial = EnumHelper.addToolMaterial("sandstone", ToolMaterial.STONE.getHarvestLevel(), (ToolMaterial.STONE.getMaxUses() + ToolMaterial.WOOD.getMaxUses()) / 2, (ToolMaterial.STONE.getEfficiency() + ToolMaterial.STONE.getEfficiency()) / 2, (ToolMaterial.STONE.getAttackDamage() + ToolMaterial.WOOD.getAttackDamage()) / 2.0F, ToolMaterial.GOLD.getEnchantability()); MaterialRegistry.sandstoneToolMaterial.setRepairItem(new ItemStack(Blocks.SANDSTONE)); }
public static void init() { for (Metal metal : TFCRegistries.METALS.getValuesCollection()) if (metal.getToolMetal() != null) metal.getToolMetal().setRepairItem(new ItemStack(ItemMetal.get(metal, Metal.ItemType.SCRAP))); }