| package fr.priya.simpleores.init; |
| |
| import fr.priya.simpleores.Reference; |
| import fr.priya.simpleores.items.Corn; |
| import fr.priya.simpleores.items.Ingot; |
| import fr.priya.simpleores.items.armor.AmnethysteArmor; |
| import fr.priya.simpleores.items.armor.CopperArmor; |
| import fr.priya.simpleores.items.armor.RubisArmor; |
| import fr.priya.simpleores.items.armor.SaphirArmor; |
| import fr.priya.simpleores.items.armor.TinArmor; |
| import fr.priya.simpleores.items.tools.CopperAxe; |
| import fr.priya.simpleores.items.tools.CopperHoe; |
| import fr.priya.simpleores.items.tools.CopperPickaxe; |
| import fr.priya.simpleores.items.tools.CopperShovel; |
| import fr.priya.simpleores.items.tools.CopperSword; |
| import net.minecraft.client.renderer.block.model.ModelResourceLocation; |
| import net.minecraft.init.Blocks; |
| import net.minecraft.inventory.EntityEquipmentSlot; |
| import net.minecraft.item.Item; |
| import net.minecraft.item.Item.ToolMaterial; |
| import net.minecraft.item.ItemSeeds; |
| import net.minecraftforge.client.event.ModelRegistryEvent; |
| import net.minecraftforge.client.model.ModelLoader; |
| import net.minecraftforge.common.util.EnumHelper; |
| import net.minecraftforge.fml.common.Mod.EventBusSubscriber; |
| import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; |
| import net.minecraftforge.fml.relauncher.Side; |
| import net.minecraftforge.fml.relauncher.SideOnly; |
| @EventBusSubscriber(value = Side.CLIENT, modid = Reference.MODID) |
| |
| public class ItemsInit { |
| public static final Item COPPER_INGOT = new Ingot("copper_ingot"); |
| public static final Item TIN_INGOT = new Ingot("tin_ingot"); |
| public static final Item AMNETHYSTE = new Ingot("amnethyste"); |
| public static final Item RUBIS = new Ingot("rubis"); |
| public static final Item SAPHIR = new Ingot("saphir"); |
| public static final Item PAIN = new Ingot("pain"); |
| public static final Item CORN_SEED = new ItemSeeds(CropsInit.CORN_CROP, Blocks.FARMLAND).setRegistryName("corn_seed").setUnlocalizedName("corn_seed"); |
| public static final Item CORN = new Corn(3,2F,false).setRegistryName("corn").setUnlocalizedName("corn"); |
| |
| public static final Item RICE = new Ingot("rice"); |
| public static final Item COPPER_HELMET = new CopperArmor(EntityEquipmentSlot.HEAD).setRegistryName("copper_helmet").setUnlocalizedName("copper_helmet"); |
| public static final Item COPPER_CHESTPLATE = new CopperArmor(EntityEquipmentSlot.CHEST).setRegistryName("copper_chestplate").setUnlocalizedName("copper_chestplate"); |
| public static final Item COPPER_LEGGINGS = new CopperArmor(EntityEquipmentSlot.LEGS).setRegistryName("copper_leggings").setUnlocalizedName("copper_leggings"); |
| public static final Item COPPER_BOOTS = new CopperArmor(EntityEquipmentSlot.FEET).setRegistryName("copper_boots").setUnlocalizedName("copper_boots"); |
| |
| public static final Item AMNETHYSTE_HELMET = new AmnethysteArmor(EntityEquipmentSlot.HEAD).setRegistryName("amnethyste_helmet").setUnlocalizedName("amnethyste_helmet"); |
| public static final Item AMNETHYSTE_CHESTPLATE = new AmnethysteArmor(EntityEquipmentSlot.CHEST).setRegistryName("amnethyste_chestplate").setUnlocalizedName("amnethyste_chestplate"); |
| public static final Item AMNETHYSTE_LEGGINGS = new AmnethysteArmor(EntityEquipmentSlot.LEGS).setRegistryName("amnethyste_leggings").setUnlocalizedName("amnethyste_leggings"); |
| public static final Item AMNETHYSTE_BOOTS = new AmnethysteArmor(EntityEquipmentSlot.FEET).setRegistryName("amnethyste_boots").setUnlocalizedName("amnethyste_boots"); |
| |
| public static final Item TIN_HELMET = new TinArmor(EntityEquipmentSlot.HEAD).setRegistryName("tin_helmet").setUnlocalizedName("tin_helmet"); |
| public static final Item TIN_CHESTPLATE = new TinArmor(EntityEquipmentSlot.CHEST).setRegistryName("tin_chestplate").setUnlocalizedName("tin_chestplate"); |
| public static final Item TIN_LEGGINGS = new TinArmor(EntityEquipmentSlot.LEGS).setRegistryName("tin_leggings").setUnlocalizedName("tin_leggings"); |
| public static final Item TIN_BOOTS = new TinArmor(EntityEquipmentSlot.FEET).setRegistryName("tin_boots").setUnlocalizedName("tin_boots"); |
| |
| public static final Item RUBIS_HELMET = new RubisArmor(EntityEquipmentSlot.HEAD).setRegistryName("rubis_helmet").setUnlocalizedName("rubis_helmet"); |
| public static final Item RUBIS_CHESTPLATE = new RubisArmor(EntityEquipmentSlot.CHEST).setRegistryName("rubis_chestplate").setUnlocalizedName("rubis_chestplate"); |
| public static final Item RUBIS_LEGGINGS = new RubisArmor(EntityEquipmentSlot.LEGS).setRegistryName("rubis_leggings").setUnlocalizedName("rubis_leggings"); |
| public static final Item RUBIS_BOOTS = new RubisArmor(EntityEquipmentSlot.FEET).setRegistryName("rubis_boots").setUnlocalizedName("rubis_boots"); |
| |
| public static final Item SAPHIR_HELMET = new SaphirArmor(EntityEquipmentSlot.HEAD).setRegistryName("saphir_helmet").setUnlocalizedName("saphir_helmet"); |
| public static final Item SAPHIR_CHESTPLATE = new SaphirArmor(EntityEquipmentSlot.CHEST).setRegistryName("saphir_chestplate").setUnlocalizedName("saphir_chestplate"); |
| public static final Item SAPHIR_LEGGINGS = new SaphirArmor(EntityEquipmentSlot.LEGS).setRegistryName("saphir_leggings").setUnlocalizedName("saphir_leggings"); |
| public static final Item SAPHIR_BOOTS = new SaphirArmor(EntityEquipmentSlot.FEET).setRegistryName("saphir_boots").setUnlocalizedName("saphir_boots"); |
| |
| public static ToolMaterial toolcopper = EnumHelper.addToolMaterial("toolcopper", 1, 199, 8.0F, 4.0F, 18); |
| public static ToolMaterial tooltin = EnumHelper.addToolMaterial("tooltin", 1, 249, 8.0F, 5.0F, 18); |
| public static ToolMaterial toolrubis = EnumHelper.addToolMaterial("toolrubis", 2, 299, 10.0F, 8.0F, 30); |
| public static ToolMaterial toolamnethyste = EnumHelper.addToolMaterial("toolamnethyste", 2, 399, 10.0F, 9.0F, 18); |
| public static ToolMaterial toolsaphir = EnumHelper.addToolMaterial("toolsaphir", 2, 399, 10.0F, 9.0F, 18); |
| |
| public static final Item COPPER_SWORD = new CopperSword("copper_sword", toolcopper); |
| public static final Item COPPER_AXE = new CopperHoe("copper_axe", toolcopper); |
| public static final Item COPPER_HOE = new CopperHoe("copper_hoe", toolcopper); |
| public static final Item COPPER_PICKAXE = new CopperPickaxe("copper_pickaxe", toolcopper); |
| public static final Item COPPER_SHOVEL = new CopperShovel("copper_shovel", toolcopper); |
| |
| public static final Item SAPHIR_SWORD = new CopperSword("saphir_sword", toolsaphir); |
| public static final Item SAPHIR_AXE = new CopperAxe("saphir_axe", toolsaphir); |
| public static final Item SAPHIR_HOE = new CopperHoe("saphir_hoe", toolsaphir); |
| public static final Item SAPHIR_PICKAXE = new CopperPickaxe("saphir_pickaxe", toolsaphir); |
| public static final Item SAPHIR_SHOVEL = new CopperShovel("saphir_shovel", toolsaphir); |
| |
| public static final Item AMNETHYSTE_SWORD = new CopperSword("amnethyste_sword", toolamnethyste); |
| public static final Item AMNETHYSTE_AXE = new CopperAxe("amnethyste_axe", toolamnethyste); |
| public static final Item AMNETHYSTE_HOE = new CopperHoe("amnethyste_hoe", toolamnethyste); |
| public static final Item AMNETHYSTE_PICKAXE = new CopperPickaxe("amnethyste_pickaxe", toolamnethyste); |
| public static final Item AMNETHYSTE_SHOVEL = new CopperShovel("amnethyste_shovel", toolamnethyste); |
| |
| public static final Item TIN_SWORD = new CopperSword("tin_sword", tooltin); |
| public static final Item TIN_AXE = new CopperAxe("tin_axe", tooltin); |
| public static final Item TIN_HOE = new CopperHoe("tin_hoe", tooltin); |
| public static final Item TIN_PICKAXE = new CopperPickaxe("tin_pickaxe", tooltin); |
| public static final Item TIN_SHOVEL = new CopperShovel("tin_shovel", tooltin); |
| |
| public static final Item RUBIS_SWORD = new CopperSword("rubis_sword", toolrubis); |
| public static final Item RUBIS_AXE = new CopperAxe("rubis_axe", toolrubis); |
| public static final Item RUBIS_HOE = new CopperHoe("rubis_hoe", toolrubis); |
| public static final Item RUBIS_PICKAXE = new CopperPickaxe("rubis_pickaxe", toolrubis); |
| public static final Item RUBIS_SHOVEL = new CopperShovel("rubis_shovel", toolrubis); |
| |
| public static void setItemName(Item item, String name) |
| { |
| item.setRegistryName(Reference.MODID, name).setUnlocalizedName(Reference.MODID + "." + name); |
| } |
| |
| @SideOnly(Side.CLIENT) |
| @SubscribeEvent |
| public static void registerItemsModels(ModelRegistryEvent event) |
| { |
| registerModel(AMNETHYSTE, 0); |
| registerModel(COPPER_INGOT, 0); |
| registerModel(TIN_INGOT, 0); |
| registerModel(RUBIS, 0); |
| registerModel(SAPHIR, 0); |
| registerModel(PAIN, 0); |
| registerModel(CORN_SEED, 0); |
| registerModel(CORN, 0); |
| |
| registerModel(RICE, 0); |
| registerModel(COPPER_HELMET, 0); |
| registerModel(COPPER_CHESTPLATE, 0); |
| registerModel(COPPER_LEGGINGS, 0); |
| registerModel(COPPER_BOOTS, 0); |
| |
| registerModel(SAPHIR_HELMET, 0); |
| registerModel(SAPHIR_CHESTPLATE, 0); |
| registerModel(SAPHIR_LEGGINGS, 0); |
| registerModel(SAPHIR_BOOTS, 0); |
| |
| registerModel(RUBIS_HELMET, 0); |
| registerModel(RUBIS_CHESTPLATE, 0); |
| registerModel(RUBIS_LEGGINGS, 0); |
| registerModel(RUBIS_BOOTS, 0); |
| |
| registerModel(AMNETHYSTE_HELMET, 0); |
| registerModel(AMNETHYSTE_CHESTPLATE, 0); |
| registerModel(AMNETHYSTE_LEGGINGS, 0); |
| registerModel(AMNETHYSTE_BOOTS, 0); |
| |
| registerModel(TIN_HELMET, 0); |
| registerModel(TIN_CHESTPLATE, 0); |
| registerModel(TIN_LEGGINGS, 0); |
| registerModel(TIN_BOOTS, 0); |
| |
| registerModel(COPPER_SWORD, 0); |
| registerModel(COPPER_PICKAXE, 0); |
| registerModel(COPPER_HOE, 0); |
| registerModel(COPPER_SHOVEL, 0); |
| registerModel(COPPER_AXE, 0); |
| |
| registerModel(TIN_SWORD, 0); |
| registerModel(TIN_PICKAXE, 0); |
| registerModel(TIN_HOE, 0); |
| registerModel(TIN_SHOVEL, 0); |
| registerModel(TIN_AXE, 0); |
| |
| registerModel(AMNETHYSTE_SWORD, 0); |
| registerModel(AMNETHYSTE_PICKAXE, 0); |
| registerModel(AMNETHYSTE_HOE, 0); |
| registerModel(AMNETHYSTE_SHOVEL, 0); |
| registerModel(AMNETHYSTE_AXE, 0); |
| |
| registerModel(RUBIS_SWORD, 0); |
| registerModel(RUBIS_PICKAXE, 0); |
| registerModel(RUBIS_HOE, 0); |
| registerModel(RUBIS_SHOVEL, 0); |
| registerModel(RUBIS_AXE, 0); |
| |
| registerModel(SAPHIR_SWORD, 0); |
| registerModel(SAPHIR_PICKAXE, 0); |
| registerModel(SAPHIR_HOE, 0); |
| registerModel(SAPHIR_SHOVEL, 0); |
| registerModel(SAPHIR_AXE, 0); |
| } |
| |
| @SideOnly(Side.CLIENT) |
| public static void registerModel(Item item, int metadata) |
| { |
| ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); |
| } |
| |
| } |
| |