Bronze Tools and Armour
|
@ -1,6 +1,7 @@
|
|||
package techreborn.init;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
@ -32,6 +33,7 @@ import techreborn.items.ItemScrapBox;
|
|||
import techreborn.items.ItemUUmatter;
|
||||
import techreborn.items.armor.ItemLapotronPack;
|
||||
import techreborn.items.armor.ItemLithiumBatpack;
|
||||
import techreborn.items.armor.ItemTRArmour;
|
||||
import techreborn.items.tools.ItemAdvancedChainsaw;
|
||||
import techreborn.items.tools.ItemAdvancedDrill;
|
||||
import techreborn.items.tools.ItemCloakingDevice;
|
||||
|
@ -48,9 +50,15 @@ import techreborn.items.tools.ItemNanosaber;
|
|||
import techreborn.items.tools.ItemOmniTool;
|
||||
import techreborn.items.tools.ItemRockCutter;
|
||||
import techreborn.items.tools.ItemSteelJackhammer;
|
||||
import techreborn.items.tools.ItemTRAxe;
|
||||
import techreborn.items.tools.ItemTRHoe;
|
||||
import techreborn.items.tools.ItemTRPickaxe;
|
||||
import techreborn.items.tools.ItemTRSpade;
|
||||
import techreborn.items.tools.ItemTRSword;
|
||||
import techreborn.items.tools.ItemTechManual;
|
||||
import techreborn.items.tools.ItemTreeTap;
|
||||
import techreborn.items.tools.ItemWrench;
|
||||
import techreborn.lib.Reference;
|
||||
|
||||
public class ModItems
|
||||
{
|
||||
|
@ -124,6 +132,17 @@ public class ModItems
|
|||
public static Item energyCrystal;
|
||||
public static Item scrapBox;
|
||||
|
||||
public static Item bronzeSword;
|
||||
public static Item bronzePickaxe;
|
||||
public static Item bronzeSpade;
|
||||
public static Item bronzeAxe;
|
||||
public static Item bronzeHoe;
|
||||
|
||||
public static Item bronzeHelmet;
|
||||
public static Item bronzeChestplate;
|
||||
public static Item bronzeLeggings;
|
||||
public static Item bronzeBoots;
|
||||
|
||||
public static Item upgrades;
|
||||
|
||||
public static Item missingRecipe;
|
||||
|
@ -207,6 +226,26 @@ public class ModItems
|
|||
diamondJackhammer = PoweredItem.createItem(ItemDiamondJackhammer.class);
|
||||
GameRegistry.registerItem(diamondJackhammer, "diamondjackhammer");
|
||||
|
||||
bronzeSword = new ItemTRSword(Reference.BRONZE);
|
||||
GameRegistry.registerItem(bronzeSword, "bronzeSword");
|
||||
bronzePickaxe = new ItemTRPickaxe(Reference.BRONZE);
|
||||
GameRegistry.registerItem(bronzePickaxe, "bronzePickaxe");
|
||||
bronzeSpade = new ItemTRSpade(Reference.BRONZE);
|
||||
GameRegistry.registerItem(bronzeSpade, "bronzeSpade");
|
||||
bronzeAxe = new ItemTRAxe(Reference.BRONZE);
|
||||
GameRegistry.registerItem(bronzeAxe, "bronzeAxe");
|
||||
bronzeHoe = new ItemTRHoe(Reference.BRONZE);
|
||||
GameRegistry.registerItem(bronzeHoe, "bronzeHoe");
|
||||
|
||||
bronzeHelmet = new ItemTRArmour(Reference.BRONZE_ARMOUR, EntityEquipmentSlot.HEAD);
|
||||
GameRegistry.registerItem(bronzeHelmet, "bronzeHelmet");
|
||||
bronzeChestplate = new ItemTRArmour(Reference.BRONZE_ARMOUR, EntityEquipmentSlot.CHEST);
|
||||
GameRegistry.registerItem(bronzeChestplate, "bronzeChestplate");
|
||||
bronzeLeggings = new ItemTRArmour(Reference.BRONZE_ARMOUR, EntityEquipmentSlot.LEGS);
|
||||
GameRegistry.registerItem(bronzeLeggings, "bronzeLeggings");
|
||||
bronzeBoots = new ItemTRArmour(Reference.BRONZE_ARMOUR, EntityEquipmentSlot.FEET);
|
||||
GameRegistry.registerItem(bronzeBoots, "bronzeBoots");
|
||||
|
||||
hammer = new ItemHammer(100);
|
||||
GameRegistry.registerItem(hammer, "hammer");
|
||||
|
||||
|
|
65
src/main/java/techreborn/items/armor/ItemTRArmour.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
package techreborn.items.armor;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 26/02/2016.
|
||||
*/
|
||||
public class ItemTRArmour extends ItemArmor implements ITexturedItem {
|
||||
|
||||
private ArmorMaterial material = ArmorMaterial.LEATHER;
|
||||
private EntityEquipmentSlot slot = EntityEquipmentSlot.HEAD;
|
||||
|
||||
public ItemTRArmour(ArmorMaterial material, EntityEquipmentSlot slot) {
|
||||
super(material, material.getDamageReductionAmount(slot), slot);
|
||||
if (slot == EntityEquipmentSlot.HEAD)
|
||||
setUnlocalizedName(material.name().toLowerCase()+"Helmet");
|
||||
if (slot == EntityEquipmentSlot.CHEST)
|
||||
setUnlocalizedName(material.name().toLowerCase()+"Chestplate");
|
||||
if (slot == EntityEquipmentSlot.LEGS)
|
||||
setUnlocalizedName(material.name().toLowerCase()+"Leggings");
|
||||
if (slot == EntityEquipmentSlot.FEET)
|
||||
setUnlocalizedName(material.name().toLowerCase()+"Boots");
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material = material;
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
if (slot == EntityEquipmentSlot.HEAD)
|
||||
return "techreborn:items/tool/" + material.name() + "_helmet";
|
||||
if (slot == EntityEquipmentSlot.CHEST)
|
||||
return "techreborn:items/tool/" + material.name() + "_chestplate";
|
||||
if (slot == EntityEquipmentSlot.LEGS)
|
||||
return "techreborn:items/tool/" + material.name() + "_leggings";
|
||||
if (slot == EntityEquipmentSlot.FEET)
|
||||
return "techreborn:items/tool/" + material.name() + "_boots";
|
||||
return "techreborn:items/tool/" + material.name() + "_error";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) {
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
|
@ -20,8 +22,6 @@ import techreborn.client.TechRebornCreativeTab;
|
|||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo, ITexturedItem
|
||||
{
|
||||
|
||||
|
|
63
src/main/java/techreborn/items/tools/ItemTRAxe.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemTool;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTRAxe extends ItemTool implements ITexturedItem {
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(new Block[] { Blocks.planks, Blocks.bookshelf,
|
||||
Blocks.log, Blocks.log2, Blocks.chest, Blocks.pumpkin, Blocks.lit_pumpkin, Blocks.melon_block,
|
||||
Blocks.ladder, Blocks.wooden_button, Blocks.wooden_pressure_plate });
|
||||
|
||||
public ItemTRAxe(ToolMaterial material) {
|
||||
super(material, EFFECTIVE_ON);
|
||||
this.damageVsEntity = material.getDamageVsEntity() + 5.75F;
|
||||
this.attackSpeed = (material.getDamageVsEntity() + 6.75F) * -0.344444F;
|
||||
setUnlocalizedName(material.name().toLowerCase() + "Axe");
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state) {
|
||||
Material material = state.getMaterial();
|
||||
return material != Material.wood && material != Material.plants && material != Material.vine
|
||||
? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_axe";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) {
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
}
|
49
src/main/java/techreborn/items/tools/ItemTRHoe.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTRHoe extends ItemHoe implements ITexturedItem
|
||||
{
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public ItemTRHoe(ToolMaterial material) {
|
||||
super(material);
|
||||
setUnlocalizedName(material.name().toLowerCase()+"Hoe");
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material=material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage)
|
||||
{
|
||||
return "techreborn:items/tool/"+material.name().toLowerCase()+"_hoe";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining)
|
||||
{
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
49
src/main/java/techreborn/items/tools/ItemTRPickaxe.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTRPickaxe extends ItemPickaxe implements ITexturedItem
|
||||
{
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public ItemTRPickaxe(ToolMaterial material) {
|
||||
super(material);
|
||||
setUnlocalizedName(material.name().toLowerCase()+"Pickaxe");
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material=material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage)
|
||||
{
|
||||
return "techreborn:items/tool/"+material.name().toLowerCase()+"_pickaxe";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining)
|
||||
{
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
49
src/main/java/techreborn/items/tools/ItemTRSpade.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTRSpade extends ItemSpade implements ITexturedItem
|
||||
{
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public ItemTRSpade(ToolMaterial material) {
|
||||
super(material);
|
||||
setUnlocalizedName(material.name().toLowerCase()+"Spade");
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material=material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage)
|
||||
{
|
||||
return "techreborn:items/tool/"+material.name().toLowerCase()+"_shovel";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining)
|
||||
{
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
49
src/main/java/techreborn/items/tools/ItemTRSword.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTRSword extends ItemSword implements ITexturedItem
|
||||
{
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public ItemTRSword(ToolMaterial material) {
|
||||
super(material);
|
||||
setUnlocalizedName(material.name().toLowerCase()+"Sword");
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material=material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage)
|
||||
{
|
||||
return "techreborn:items/tool/"+material.name().toLowerCase()+"_sword";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining)
|
||||
{
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,9 +1,15 @@
|
|||
package techreborn.lib;
|
||||
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
public class Reference
|
||||
{
|
||||
public static ToolMaterial BRONZE = EnumHelper.addToolMaterial("BRONZE", 2, 375, 6.0F, 2.25F, 8);
|
||||
public static ArmorMaterial BRONZE_ARMOUR = EnumHelper.addArmorMaterial("BRONZE", ModInfo.MOD_ID+":bronze", 17, new int[] {3,6,5,2}, 8, null/*TODO: SoundEvent*/);
|
||||
|
||||
public static String alloySmelteRecipe = I18n.translateToLocal("techreborn.recipe.alloysmelter");
|
||||
public static String assemblingMachineRecipe = I18n.translateToLocal("techreborn.recipe.assemblingmachine");
|
||||
public static String blastFurnaceRecipe = I18n.translateToLocal("techreborn.recipe.blastfurnace");
|
||||
|
|
|
@ -644,6 +644,15 @@ item.techreborn.hammer.name=Iron Hammer
|
|||
item.techreborn.ironJackhammer.name=Iron Jackhammer
|
||||
item.techreborn.steelJackhammer.name=Steel Jackhammer
|
||||
item.techreborn.diamondJackhammer.name=Diamond Jackhammer
|
||||
item.bronzeSword.name=Bronze Sword
|
||||
item.bronzePickaxe.name=Bronze Pickaxe
|
||||
item.bronzeSpade.name=Bronze Shovel
|
||||
item.bronzeAxe.name=Bronze Axe
|
||||
item.bronzeHoe.name=Bronze Hoe
|
||||
item.bronzeHelmet.name=Bronze Helmet
|
||||
item.bronzeChestplate.name=Bronze Chestplate
|
||||
item.bronzeLeggings.name=Bronze Leggings
|
||||
item.bronzeBoots.name=Bronze Boots
|
||||
|
||||
#Buckets
|
||||
item.bucketberylium.name=Berylium Bucket
|
||||
|
|
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 271 B |
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 290 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 735 B |