ForgeHammer update rewrite fk refactoriung
This commit is contained in:
@@ -743,28 +743,26 @@ public final class ModItems {
|
||||
GameRegistry.registerItem(charcoalFilter, "charcoalFilter");
|
||||
|
||||
rawCuredLeather = new RawCuredLeather();
|
||||
//ironShield = new ItemIronShield();
|
||||
fireBow = new FireBow();
|
||||
leatherShears = new LeatherShears();
|
||||
ironSaw = new IronSaw();
|
||||
flintSaw = new FlintSaw();
|
||||
|
||||
ironPickaxeForm = new IronPickaxeForm();
|
||||
ironSpadForm = new IronSpadeForm();
|
||||
ironHoeForm = new IronHoeForm();
|
||||
ironAxeForm = new IronAxeForm();
|
||||
ironLongswordForm = new IronLongswordForm();
|
||||
ironShortSwordForm = new IronShortSwordForm();
|
||||
ironDaggerForm = new IronDaggerForm();
|
||||
ironHandleForm = new IronHandleForm();
|
||||
ironSpearTipForm = new IronSpearTipForm();
|
||||
ironMaceHeadForm = new IronMaceHeadForm();
|
||||
ironBattleAxeForm = new IronBattleAxeForm();
|
||||
ironSawBladeForm = new IronSawBladeForm();
|
||||
ironSharpTipForm = new IronSharpTipForm();
|
||||
ironRingForm = new IronRingForm();
|
||||
ironAxeForm = new IronAxeForm("ironAxeForm", ironAxeForm);
|
||||
ironBattleAxeForm = new IronBattleAxeForm("ironBattleAxeForm", ironBattleAxeForm);
|
||||
ironDaggerForm = new IronDaggerForm("ironDaggerForm", ironDaggerForm);
|
||||
ironHandleForm = new IronHandleForm("ironHandleForm", ironHandleForm);
|
||||
ironHoeForm = new IronHoeForm("ironHoeForm", ironHoeForm);
|
||||
ironLongswordForm = new IronLongswordForm("ironLongswordForm", ironLongswordForm);
|
||||
ironMaceHeadForm = new IronMaceHeadForm("ironMaceHeadForm", ironMaceHeadForm);
|
||||
ironPickaxeForm = new IronPickaxeForm("ironPickaxeForm", ironPickaxeForm);
|
||||
ironRingForm = new IronRingForm("ironRingForm", ironRingForm);
|
||||
ironSawBladeForm = new IronSawBladeForm("ironSawBladeForm", ironSawBladeForm);
|
||||
ironSharpTipForm = new IronSharpTipForm("ironSharpTipForm", ironSharpTipForm);
|
||||
ironShortSwordForm = new IronShortSwordForm("ironShortSwordForm", ironShortSwordForm);
|
||||
ironSpadForm = new IronSpadeForm("ironSpadeForm", ironSpadForm);
|
||||
ironSpearTipForm = new IronSpearTipForm("ironSpearTipForm", ironSpearTipForm);
|
||||
//clayFormBook = new ItemClayFormBook();
|
||||
|
||||
|
||||
//-----------------------MATERIALS REGISTERY-----------------------//
|
||||
|
||||
|
||||
@@ -17,28 +17,28 @@ import net.minecraft.world.World;
|
||||
|
||||
import com.kitsu.medievalcraft.Main;
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.block.ingots.IngotBase;
|
||||
import com.kitsu.medievalcraft.crafting.ForgeAnvilCrafting;
|
||||
import com.kitsu.medievalcraft.crafting.TestForgeCrafting;
|
||||
import com.kitsu.medievalcraft.item.ModItems;
|
||||
import com.kitsu.medievalcraft.packethandle.forgeHammerParticles.MsgPacket;
|
||||
import com.kitsu.medievalcraft.packethandle.forgeHammerParticles.MsgPacketLocY;
|
||||
import com.kitsu.medievalcraft.packethandle.forgeHammerParticles.MsgPacketLocZ;
|
||||
import com.kitsu.medievalcraft.packethandle.forgeHammerParticles.MsgPacketlTicks;
|
||||
import com.kitsu.medievalcraft.item.forms.iron.IronForms;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileIronPlate;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileMyIronIngot;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntityAnvilForge;
|
||||
import com.kitsu.medievalcraft.util.CustomTab;
|
||||
import com.kitsu.medievalcraft.util.IronFormNames;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
|
||||
public class ForgeHammer extends Item {
|
||||
public class ForgeHammer extends Item implements IronFormNames{
|
||||
|
||||
private String name = "forgeHammer";
|
||||
private Item item;
|
||||
//private Block test;
|
||||
private int hit, key, blockKey, keys;
|
||||
public static boolean forgeHammerLeftClick;
|
||||
//TileEntityHotIronIngotBlock tileBlock;
|
||||
//TileEntityHotIronPlate tilePlate;
|
||||
TileMyIronIngot tileRefIngot;
|
||||
TileIronPlate tilePlate;
|
||||
Random rand;
|
||||
|
||||
public ForgeHammer() {
|
||||
@@ -72,18 +72,31 @@ public class ForgeHammer extends Item {
|
||||
|
||||
private void onClick(Block block, Block blockSub, World world, int x, int y, int z, EntityPlayer p, ItemStack stack, Random rand){
|
||||
|
||||
if(block == ModBlocks.hotIronBlock){
|
||||
tileBlock = (TileEntityHotIronIngotBlock) world.getTileEntity(x, y, z);
|
||||
if(block == ModBlocks.refinedIron){
|
||||
tileRefIngot = (TileMyIronIngot) world.getTileEntity(x, y, z);
|
||||
}
|
||||
if(block == ModBlocks.hotIronPlate){
|
||||
tilePlate = (TileEntityHotIronPlate) world.getTileEntity(x, y, z);
|
||||
if(block == ModBlocks.ironPlate){
|
||||
tilePlate = (TileIronPlate) world.getTileEntity(x, y, z);
|
||||
}
|
||||
if((block == blockToRun(block)) && (blockSub == ModBlocks.forgeAnvil) && (p.isSwingInProgress == false)){
|
||||
TileEntityAnvilForge tileEnt = (TileEntityAnvilForge) world.getTileEntity(x, y-1, z);
|
||||
|
||||
if((block instanceof IngotBase)&&(blockSub == ModBlocks.forgeAnvil) && (p.isSwingInProgress == false)){
|
||||
TileEntityAnvilForge tileEnt = (TileEntityAnvilForge) world.getTileEntity(x, y-1, z);
|
||||
if(tileEnt.getStackInSlot(0).getItem() instanceof IronForms){
|
||||
if(){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*if((block == blockToRun(block)) && (blockSub == ModBlocks.forgeAnvil) && (p.isSwingInProgress == false)){
|
||||
TileEntityAnvilForge tileEnt = (TileEntityAnvilForge) world.getTileEntity(x, y-1, z);
|
||||
|
||||
if((tileEnt.getStackInSlot(0) == null) && (blockKey == 0)){
|
||||
if (rand.nextInt(2) == 0 ) {
|
||||
tileBlock.hits++;
|
||||
tileRefIngot.hits++;
|
||||
}
|
||||
p.worldObj.playSoundAtEntity(p, Main.MODID + ":anvilhammer", 1.0F, 1.0F);
|
||||
Main.sNet.sendToAll(new MsgPacket(true));
|
||||
@@ -91,8 +104,8 @@ public class ForgeHammer extends Item {
|
||||
Main.sNet.sendToAll(new MsgPacketLocY(y));
|
||||
Main.sNet.sendToAll(new MsgPacketLocZ(z));
|
||||
|
||||
if(tileBlock.hits >= 4){
|
||||
tileBlock.hits = 0;
|
||||
if(tileRefIngot.hits >= 4){
|
||||
tileRefIngot.hits = 0;
|
||||
p.worldObj.playSoundAtEntity(p, Main.MODID + ":anvilhammer", 1.0F, 1.0F);
|
||||
Main.sNet.sendToAll(new MsgPacket(true));
|
||||
Main.sNet.sendToAll(new MsgPacketlTicks(x));
|
||||
@@ -105,7 +118,7 @@ public class ForgeHammer extends Item {
|
||||
if((tileEnt.getStackInSlot(0) != null)){
|
||||
if((tileEnt.getStackInSlot(0).getItem() == Items.flower_pot) && (blockKey == 0)){
|
||||
if (rand.nextInt(2) == 0 ) {
|
||||
tileBlock.hits++;
|
||||
tileRefIngot.hits++;
|
||||
}
|
||||
p.worldObj.playSoundAtEntity(p, Main.MODID + ":anvilhammer", 1.0F, 1.0F);
|
||||
Main.sNet.sendToAll(new MsgPacket(true));
|
||||
@@ -113,8 +126,8 @@ public class ForgeHammer extends Item {
|
||||
Main.sNet.sendToAll(new MsgPacketLocY(y));
|
||||
Main.sNet.sendToAll(new MsgPacketLocZ(z));
|
||||
|
||||
if(tileBlock.hits >= 4){
|
||||
tileBlock.hits = 0;
|
||||
if(tileRefIngot.hits >= 4){key
|
||||
tileRefIngot.hits = 0;
|
||||
p.worldObj.playSoundAtEntity(p, Main.MODID + ":anvilhammer", 1.0F, 1.0F);
|
||||
Main.sNet.sendToAll(new MsgPacket(true));
|
||||
Main.sNet.sendToAll(new MsgPacketlTicks(x));
|
||||
@@ -142,11 +155,11 @@ public class ForgeHammer extends Item {
|
||||
Main.sNet.sendToAll(new MsgPacketLocZ(z));
|
||||
stack.damageItem(1, p);
|
||||
if (rand.nextInt(2) == 0 ) {
|
||||
tileBlock.hits++;
|
||||
tileRefIngot.hits++;
|
||||
}
|
||||
}
|
||||
if(tileBlock.hits >= 4){
|
||||
tileBlock.hits=0;
|
||||
if(tileRefIngot.hits >= 4){
|
||||
tileRefIngot.hits=0;
|
||||
checkItem.setDamage(tileEnt.getStackInSlot(0), 0);
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
}
|
||||
@@ -158,7 +171,7 @@ public class ForgeHammer extends Item {
|
||||
Main.sNet.sendToAll(new MsgPacketlTicks(x));
|
||||
Main.sNet.sendToAll(new MsgPacketLocY(y));
|
||||
Main.sNet.sendToAll(new MsgPacketLocZ(z));
|
||||
tilePlate.hitGood=true;
|
||||
|
||||
if (rand.nextInt(2) == 0 ) {
|
||||
tilePlate.hits++;
|
||||
}
|
||||
@@ -174,7 +187,7 @@ public class ForgeHammer extends Item {
|
||||
if((checkItem == getItem(checkItem)) || (checkItem == getItem3(checkItem)) || (checkItem == getItem2(checkItem).getItem())){
|
||||
if (rand.nextInt(2) == 0 ) {
|
||||
if(blockKey == 0){
|
||||
tileBlock.hits++;
|
||||
tileRefIngot.hits++;
|
||||
}
|
||||
if(blockKey == 3){
|
||||
tilePlate.hits++;
|
||||
@@ -188,8 +201,8 @@ public class ForgeHammer extends Item {
|
||||
|
||||
if((blockKey == 0) && (checkItem == getItem(checkItem))){
|
||||
|
||||
if(tileBlock.hits >= 4){
|
||||
tileBlock.hits=0;
|
||||
if(tileRefIngot.hits >= 4){
|
||||
tileRefIngot.hits=0;
|
||||
giveItem(key, world, x, y, z, p);
|
||||
stack.damageItem(1, p);
|
||||
if(tileEnt.getStackInSlot(0).getMaxStackSize() == 1){
|
||||
@@ -204,8 +217,8 @@ public class ForgeHammer extends Item {
|
||||
}
|
||||
|
||||
if((blockKey == 0) && (checkItem == getItem3(checkItem))){
|
||||
if(tileBlock.hits >= 4){
|
||||
tileBlock.hits=0;
|
||||
if(tileRefIngot.hits >= 4){
|
||||
tileRefIngot.hits=0;
|
||||
giveItem(key, world, x, y, z, p);
|
||||
stack.damageItem(1, p);
|
||||
if(tileEnt.getStackInSlot(0).getMaxStackSize() == 1){
|
||||
@@ -238,6 +251,7 @@ public class ForgeHammer extends Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
/*
|
||||
@@ -248,15 +262,9 @@ public class ForgeHammer extends Item {
|
||||
|
||||
public void giveItem(int a, World world, int x, int y, int z, EntityPlayer p){
|
||||
if(blockKey == 0){
|
||||
//Item item = ForgeAnvilCrafting.itemToGive.get(key);
|
||||
//ItemStack stack = ForgeAnvilCrafting.itemToGive.get(key);
|
||||
|
||||
//world.spawnParticle("lava", x, y, z, 0.0F, 0.0F, 0.0F);
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
p.worldObj.playSoundAtEntity(p, Main.MODID + ":anvilhammer", 1.0F, 1.0F);
|
||||
world.spawnEntityInWorld(new EntityItem(world, x+0.5D, y+0.6D, z+0.5D, ForgeAnvilCrafting.itemToGive.get(key)));
|
||||
//stack.stackTagCompound = new NBTTagCompound();
|
||||
//stack.stackTagCompound.setInteger("UPGRADES", 0);
|
||||
}
|
||||
if(blockKey == 3){
|
||||
Item item = ForgeAnvilCrafting.itemToCheck.get(key);
|
||||
|
||||
@@ -5,48 +5,13 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.kitsu.medievalcraft.Main;
|
||||
import com.kitsu.medievalcraft.util.CustomTab;
|
||||
import com.kitsu.medievalcraft.item.ModItems;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronAxeForm extends Item {
|
||||
private String name = "ironAxeForm";
|
||||
private Item item;
|
||||
|
||||
public IronAxeForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronAxeForm extends IronForms {
|
||||
|
||||
public IronAxeForm(String name, Item item) {
|
||||
super(name, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,45 +8,9 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronBattleAxeForm extends Item {
|
||||
private String name = "ironBattleAxeForm";
|
||||
private Item item;
|
||||
|
||||
public IronBattleAxeForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronBattleAxeForm extends IronForms {
|
||||
|
||||
public IronBattleAxeForm(String name, Item item) {
|
||||
super(name, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,45 +8,11 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronDaggerForm extends Item {
|
||||
private String name = "ironDaggerForm";
|
||||
private Item item;
|
||||
|
||||
public IronDaggerForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronDaggerForm extends IronForms {
|
||||
|
||||
public IronDaggerForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.kitsu.medievalcraft.item.forms.iron;
|
||||
|
||||
import com.kitsu.medievalcraft.Main;
|
||||
import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public abstract class IronForms extends Item {
|
||||
|
||||
protected IronForms(String name, Item item){
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
item = this;
|
||||
GameRegistry.registerItem(this, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
this.setDamage(new ItemStack(this), +1);
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,43 +8,11 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronHandleForm extends Item {
|
||||
private String name = "ironHandleForm";
|
||||
private Item item;
|
||||
|
||||
public IronHandleForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
public class IronHandleForm extends IronForms {
|
||||
|
||||
public IronHandleForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8,45 +8,11 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronHoeForm extends Item {
|
||||
private String name = "ironHoeForm";
|
||||
private Item item;
|
||||
|
||||
public IronHoeForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronHoeForm extends IronForms {
|
||||
|
||||
public IronHoeForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8,44 +8,11 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronLongswordForm extends Item {
|
||||
private String name = "ironLongswordForm";
|
||||
private Item item;
|
||||
|
||||
public IronLongswordForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronLongswordForm extends IronForms {
|
||||
|
||||
public IronLongswordForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,45 +8,10 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronMaceHeadForm extends Item {
|
||||
private String name = "ironMaceHeadForm";
|
||||
private Item item;
|
||||
|
||||
public IronMaceHeadForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronMaceHeadForm extends IronForms {
|
||||
|
||||
public IronMaceHeadForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,43 +8,10 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronPickaxeForm extends Item {
|
||||
private String name = "ironPickaxeForm";
|
||||
private Item item;
|
||||
|
||||
public IronPickaxeForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
public class IronPickaxeForm extends IronForms {
|
||||
|
||||
public IronPickaxeForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,45 +8,10 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronRingForm extends Item {
|
||||
private String name = "ironRingForm";
|
||||
private Item item;
|
||||
|
||||
public IronRingForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(200);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronRingForm extends IronForms {
|
||||
|
||||
public IronRingForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,45 +8,11 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronSawBladeForm extends Item {
|
||||
private String name = "ironSawBladeForm";
|
||||
private Item item;
|
||||
|
||||
public IronSawBladeForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronSawBladeForm extends IronForms {
|
||||
|
||||
public IronSawBladeForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,45 +8,11 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronSharpTipForm extends Item {
|
||||
private String name = "ironSharpTipForm";
|
||||
private Item item;
|
||||
|
||||
public IronSharpTipForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(200);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronSharpTipForm extends IronForms {
|
||||
|
||||
public IronSharpTipForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,45 +8,10 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronShortSwordForm extends Item {
|
||||
private String name = "ironShortSwordForm";
|
||||
private Item item;
|
||||
|
||||
public IronShortSwordForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronShortSwordForm extends IronForms {
|
||||
|
||||
public IronShortSwordForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,45 +8,12 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronSpadeForm extends Item {
|
||||
private String name = "ironSpadForm";
|
||||
private Item item;
|
||||
|
||||
public IronSpadeForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronSpadeForm extends IronForms {
|
||||
|
||||
public IronSpadeForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,45 +8,10 @@ import com.kitsu.medievalcraft.util.CustomTab;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class IronSpearTipForm extends Item {
|
||||
private String name = "ironSpearTipForm";
|
||||
private Item item;
|
||||
|
||||
public IronSpearTipForm() {
|
||||
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(64);
|
||||
setNoRepair();
|
||||
|
||||
item = this;
|
||||
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
|
||||
public class IronSpearTipForm extends IronForms {
|
||||
|
||||
public IronSpearTipForm(String name, Item item) {
|
||||
super(name, item);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getContainerItem()
|
||||
{
|
||||
item.setDamage(new ItemStack(item), +1);
|
||||
//itemStack.setItemDamage(itemStack.getItemDamage() + 1);
|
||||
return item;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user