Refactor Tools

This commit is contained in:
kitsushadow
2015-07-09 06:13:43 -04:00
parent b4f5347cda
commit c1ef01dd0c
19 changed files with 95 additions and 103 deletions

View File

@@ -756,11 +756,16 @@ public final class ModItems {
GameRegistry.registerItem(battleAxe = new ItemBattleAxe("battleAxe", heavymacemat), "battleAxe");
GameRegistry.registerItem(customIronPick = new CustomIronPick("customIronPick", customWoodNormal), "customIronPick");
GameRegistry.registerItem(customStrongIronPick = new CustomStrongIronPick("customStrongIronPick", customWoodStrong), "customStrongIronPick");
GameRegistry.registerItem(customStrongIronPick = new CustomIronPick("customStrongIronPick", customWoodStrong), "customStrongIronPick");
GameRegistry.registerItem(customWeakIronPick = new CustomIronPick("customWeakIronPick", customWoodWeak), "customWeakIronPick");
GameRegistry.registerItem(customHandleIronPick = new CustomIronPick("customHandleIronPick", customIronToolRodNormal), "customHandleIronPick");
GameRegistry.registerItem(customHandleStrongIronPick = new CustomIronPick("customHandleStrongIronPick", customIronToolRodStrong), "customHandleStrongIronPick");
/* GameRegistry.registerItem(customStrongIronPick = new CustomStrongIronPick("customStrongIronPick", customWoodStrong), "customStrongIronPick");
GameRegistry.registerItem(customWeakIronPick = new CustomWeakIronPick("customWeakIronPick", customWoodWeak), "customWeakIronPick");
GameRegistry.registerItem(customHandleIronPick = new CustomHandleIronPick("customHandleIronPick", customIronToolRodNormal), "customHandleIronPick");
GameRegistry.registerItem(customHandleStrongIronPick = new CustomHandleStrongIronPick("customHandleStrongIronPick", customIronToolRodStrong), "customHandleStrongIronPick");
*/
GameRegistry.registerItem(customIronShovel = new CustomIronShovel("customIronShovel", customWoodNormal), "customIronShovel");
GameRegistry.registerItem(customStrongIronShovel = new CustomStrongIronShovel("customStrongIronShovel", customWoodStrong), "customStrongIronShovel");
GameRegistry.registerItem(customWeakIronShovel = new CustomWeakIronShovel("customWeakIronShovel", customWoodWeak), "customWeakIronShovel");

View File

@@ -1,5 +1,8 @@
package com.kitsu.medievalcraft.item.tools;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
@@ -14,18 +17,26 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomIronPick extends ItemPickaxe{
private String name = "customIronPick";
private Item item;
//private String name = "customIronPick";
//private Item item;
public CustomIronPick(String name, ToolMaterial mat) {
super(mat);
item = this;
//item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + name);
this.toolMaterial = ModItems.customWoodNormal;
GameRegistry.registerItem(this, name);
//this.toolMaterial = ModItems.customWoodNormal;
//GameRegistry.registerItem(this, name);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
list.add("");
}
@Override
public int getItemEnchantability () {
return 0;