Pickaxe objectify further and more icons

This commit is contained in:
KitsuShadow
2015-07-10 23:28:21 -04:00
parent c1ef01dd0c
commit 14ea43fa6e
102 changed files with 373 additions and 1485 deletions

View File

@@ -55,7 +55,7 @@ public class Main {
public static final String MODID = "kitsumedievalcraft";
public static final String MODNAME = "ForgeCraft";
public static final String VERSION = "2.2.2";
public static final String VERSION = "2.2.3";
public static SimpleNetworkWrapper sNet;
@@ -131,8 +131,6 @@ public class Main {
ModDict.RegisterOres();
System.out.println("U want some Body Massage?");
//RenderingRegistry.registerEntityRenderingHandler(EntityShit.class, new RenderSnowball(ModItems.itemShit));
}
}

View File

@@ -7,7 +7,6 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
@@ -21,8 +20,6 @@ import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@@ -32,7 +29,6 @@ import com.kitsu.medievalcraft.block.ModBlocks;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.renderer.RenderId;
import com.kitsu.medievalcraft.tileents.machine.TileEntityFirebox;
import com.kitsu.medievalcraft.tileents.machine.TileEntityShelfFour;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -68,26 +64,43 @@ public class Firebox extends BlockContainer{
@Override
public boolean isFireSource(World world, int x, int y, int z, ForgeDirection side) {
if (this == ModBlocks.firebox && side == UP){
return true;
TileEntityFirebox tile = (TileEntityFirebox) world.getTileEntity(x, y, z);
if(this.getItemBurnTime(tile.getStackInSlot(0))>0){
return true;
}
}
return true;
return false;
}
@Override
public int getLightValue(IBlockAccess world,int x,int y,int z){
if(world.getBlockMetadata(x, y, z)==1){
return 15;
}
return 0;
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
super.randomDisplayTick(world, x, y, z, random);
if(world.getBlockMetadata(x, y, z)==1){
if (rand.nextInt(24) == 0&&world.getBlock(x, y+1, z)!=Blocks.fire)
{
world.playSound((double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), "fire.fire", 1.0F + rand.nextFloat(), rand.nextFloat() * 0.7F + 0.3F, false);
}
int l;
float f;
float f1;
float f2;
for (l = 0; l < 3; ++l)
{
f = (float)(x+0.25) + (rand.nextFloat()/2);
f = (float)(x+0.1) + ((rand.nextFloat()/1.25f));
f1 = (float)y+0.3f + rand.nextFloat() * 0.4F;
f2 = (float)(z+0.25) + (rand.nextFloat()/2);
f2 = (float)(z+0.1) + ((rand.nextFloat()/1.25f));
world.spawnParticle("fire", (double)f, (double)f1, (double)f2, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", (double)f, (double)f1, (double)f2, 0.0D, 0.0D, 0.0D);
world.spawnParticle("smoke", (double)f, (double)f1, (double)f2, 0.0D, 0.0D, 0.0D);
@@ -106,7 +119,8 @@ public class Firebox extends BlockContainer{
(player.inventory.getCurrentItem().getItem()==ModItems.fireBow)
){
world.setBlockMetadataWithNotify(x, y, z, 1, 3);
this.setLightLevel(1f);
tileEnt.markForUpdate();
tileEnt.markDirty();
player.inventory.getCurrentItem().damageItem(1, player);
if(world.getBlock(x, y, z).equals(Blocks.air)){
world.setBlock(x, y+1, z, Blocks.fire, 0, 2);

View File

@@ -52,6 +52,7 @@ public class Forge extends BlockContainer implements TileForgePlaceables{
this.setResistance(5.0F);
this.setHarvestLevel("pickaxe", 1, 0);
this.setStepSound(Block.soundTypeStone);
//this.setTickRandomly(true);
//this.isFlammable(world, x, y, z, face);
//(xmin, ymin, zmin,
// xmax, ymax, zmax)
@@ -64,6 +65,26 @@ public class Forge extends BlockContainer implements TileForgePlaceables{
{
return true;
}
@Override
public int getLightValue(IBlockAccess world,int x,int y,int z){
if(world.getBlockMetadata(x, y, z)>3){
return 15;
}
return 0;
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
/*System.out.println("Update Tick");
if(world.getBlockMetadata(x, y, z)<4){
this.setLightLevel(0f);
}
if(world.getBlockMetadata(x, y, z)>3){
this.setLightLevel(1f);
}
*/
}
@Override
@SideOnly(Side.CLIENT)
@@ -163,7 +184,8 @@ public class Forge extends BlockContainer implements TileForgePlaceables{
(player.inventory.getCurrentItem().getItem()==ModItems.fireBow)){
if(world.getBlockMetadata(x, y, z)<=3){
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)+4, 3);
this.setLightLevel(1f);
tileEnt.markDirty();
tileEnt.markForUpdate();
}
tileEnt.markForUpdate();
if(tileEnt.getStackInSlot(1)!=null){
@@ -221,6 +243,7 @@ public class Forge extends BlockContainer implements TileForgePlaceables{
if(isItemFuel(player.inventory.getCurrentItem())==true){
tileEnt.setInventorySlotContents(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
//world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)+4, 3);
}
}
if(tileEnt.getStackInSlot(0)!=null){
@@ -245,6 +268,8 @@ public class Forge extends BlockContainer implements TileForgePlaceables{
if(tileEnt.getStackInSlot(0)!=null){
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, tileEnt.getStackInSlot(0)));
tileEnt.setInventorySlotContents(0, null);
tileEnt.markDirty();
tileEnt.markForUpdate();
}
return true;
}

View File

@@ -285,53 +285,63 @@ public final class ModCrafting {
GameRegistry.addRecipe(new ShapedOreRecipe((ModItems.customIronLumberAxe), new Object[]{"a", "c", "b", Character.valueOf('c'), "strapLeather", 'a', ModItems.ironaxeHead, 'b', ModItems.woodentoolHandle}));
GameRegistry.addRecipe(new ShapedOreRecipe((ModItems.customHandleIronLumberAxe), new Object[]{"a", "c", "b", Character.valueOf('c'), "strapLeather", 'a', ModItems.ironaxeHead, 'b', ModItems.ironweaponHandle}));
ItemStack sTouchpick = new ItemStack(ModItems.customWeakIronPick);
GameRegistry.addRecipe(new ShapedOreRecipe((ModItems.customIronHoe), new Object[]{"a", "c", "b", Character.valueOf('c'), "strapLeather", 'a', ModItems.ironhoeHead, 'b', ModItems.woodentoolHandle}));
ItemStack sTouchpick = new ItemStack(ModItems.customIronPick1);
sTouchpick.addEnchantment(Enchantment.silkTouch, 1);
ItemStack sTouchpick1 = new ItemStack(ModItems.customWeakIronPick);
ItemStack sTouchpick1 = new ItemStack(ModItems.customIronPick2);
sTouchpick1.addEnchantment(Enchantment.silkTouch, 1);
sTouchpick1.addEnchantment(Enchantment.unbreaking, 1);
ItemStack sTouchpick3 = new ItemStack(ModItems.customIronPick4);
sTouchpick3.addEnchantment(Enchantment.silkTouch, 1);
ItemStack sTouchpick2 = new ItemStack(ModItems.customHandleIronPick);
ItemStack sTouchpick2 = new ItemStack(ModItems.customIronPick3);
sTouchpick2.addEnchantment(Enchantment.silkTouch, 1);
sTouchpick2.addEnchantment(Enchantment.efficiency, 1);
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchpick, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronHead, 'b', ModItems.woodentoolHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchpick1, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronHead, 'b', ModItems.unbreakingWoodRod, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchpick, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronHead, 'b', ModItems.ironweaponHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchpick3, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronHead, 'b', ModItems.ironweaponHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchpick2, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronHead, 'b', ModItems.efficIronRod, Character.valueOf('c'), "strapLeather"}));
ItemStack sTouchspade = new ItemStack(ModItems.customWeakIronShovel);
sTouchspade.addEnchantment(Enchantment.silkTouch, 1);
ItemStack sTouchspade0 = new ItemStack(ModItems.customIronShovel0);
sTouchspade0.addEnchantment(Enchantment.silkTouch, 1);
ItemStack sTouchspade2 = new ItemStack(ModItems.customIronShovel2);
sTouchspade2.addEnchantment(Enchantment.silkTouch, 1);
ItemStack sTouchspade1 = new ItemStack(ModItems.customWeakIronShovel);
ItemStack sTouchspade1 = new ItemStack(ModItems.customIronShovel1);
sTouchspade1.addEnchantment(Enchantment.silkTouch, 1);
sTouchspade1.addEnchantment(Enchantment.unbreaking, 1);
ItemStack sTouchspade2 = new ItemStack(ModItems.customHandleIronShovel);
sTouchspade2.addEnchantment(Enchantment.silkTouch, 1);
sTouchspade2.addEnchantment(Enchantment.efficiency, 1);
ItemStack sTouchspade3 = new ItemStack(ModItems.customIronShovel3);
sTouchspade3.addEnchantment(Enchantment.silkTouch, 1);
sTouchspade3.addEnchantment(Enchantment.efficiency, 1);
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchspade, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronSpade, 'b', ModItems.woodentoolHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchspade0, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronSpade, 'b', ModItems.woodentoolHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchspade1, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronSpade, 'b', ModItems.unbreakingWoodRod, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchspade, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronSpade, 'b', ModItems.ironweaponHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchspade2, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronSpade, 'b', ModItems.efficIronRod, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchspade2, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronSpade, 'b', ModItems.ironweaponHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchspade3, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronSpade, 'b', ModItems.efficIronRod, Character.valueOf('c'), "strapLeather"}));
ItemStack sTouchaxe = new ItemStack(ModItems.customWeakIronLumberAxe);
ItemStack sTouchaxe = new ItemStack(ModItems.customIronLumberAxe0);
sTouchaxe.addEnchantment(Enchantment.silkTouch, 1);
ItemStack sTouchaxe3 = new ItemStack(ModItems.customIronLumberAxe3);
sTouchaxe3.addEnchantment(Enchantment.silkTouch, 1);
ItemStack sTouchaxe1 = new ItemStack(ModItems.customWeakIronLumberAxe);
ItemStack sTouchaxe1 = new ItemStack(ModItems.customIronLumberAxe1);
sTouchaxe1.addEnchantment(Enchantment.silkTouch, 1);
sTouchaxe1.addEnchantment(Enchantment.unbreaking, 1);
ItemStack sTouchaxe2 = new ItemStack(ModItems.customHandleIronLumberAxe);
ItemStack sTouchaxe2 = new ItemStack(ModItems.customIronLumberAxe2);
sTouchaxe2.addEnchantment(Enchantment.silkTouch, 1);
sTouchaxe2.addEnchantment(Enchantment.efficiency, 1);
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchaxe, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronLumberAxe, 'b', ModItems.woodentoolHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchaxe1, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronLumberAxe, 'b', ModItems.unbreakingWoodRod, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchaxe, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronLumberAxe, 'b', ModItems.ironweaponHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchaxe3, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronLumberAxe, 'b', ModItems.ironweaponHandle, Character.valueOf('c'), "strapLeather"}));
GameRegistry.addRecipe(new ShapedOreRecipe(sTouchaxe2, new Object[]{"a", "c", "b", 'a', ModItems.silkTouchIronLumberAxe, 'b', ModItems.efficIronRod, Character.valueOf('c'), "strapLeather"}));
//REGISTERS ALL POSSIBLE COMBINATIONS OF PICKAXE
@@ -344,7 +354,6 @@ public final class ModCrafting {
GameRegistry.addRecipe(new ShapedOreRecipe(enchantedSwitch,
new Object[]{"a", "c", "b", 'a', pickheads.get(i), 'b', rods.get(j), Character.valueOf('c'), "strapLeather"}));
} else if
((i == 0 && j == 3)){
ItemStack enchantedSwitch = new ItemStack(ModItems.customHandleIronPick);
enchantedSwitch.addEnchantment(Enchantment.unbreaking, 1);

View File

@@ -52,21 +52,10 @@ import com.kitsu.medievalcraft.item.misc.ItemSmallBarrelLid;
import com.kitsu.medievalcraft.item.misc.RawCuredLeather;
import com.kitsu.medievalcraft.item.throwable.ItemShit;
import com.kitsu.medievalcraft.item.throwable.ItemTester;
import com.kitsu.medievalcraft.item.tools.CustomHandleIronLumberAxe;
import com.kitsu.medievalcraft.item.tools.CustomHandleIronPick;
import com.kitsu.medievalcraft.item.tools.CustomHandleIronShovel;
import com.kitsu.medievalcraft.item.tools.CustomHandleStrongIronLumberAxe;
import com.kitsu.medievalcraft.item.tools.CustomHandleStrongIronPick;
import com.kitsu.medievalcraft.item.tools.CustomHandleStrongIronShovel;
import com.kitsu.medievalcraft.item.tools.CustomIronHoe;
import com.kitsu.medievalcraft.item.tools.CustomIronLumberAxe;
import com.kitsu.medievalcraft.item.tools.CustomIronPick;
import com.kitsu.medievalcraft.item.tools.CustomIronShovel;
import com.kitsu.medievalcraft.item.tools.CustomStrongIronLumberAxe;
import com.kitsu.medievalcraft.item.tools.CustomStrongIronPick;
import com.kitsu.medievalcraft.item.tools.CustomStrongIronShovel;
import com.kitsu.medievalcraft.item.tools.CustomWeakIronLumberAxe;
import com.kitsu.medievalcraft.item.tools.CustomWeakIronPick;
import com.kitsu.medievalcraft.item.tools.CustomWeakIronShovel;
import com.kitsu.medievalcraft.item.weapon.ItemBattleAxe;
import com.kitsu.medievalcraft.item.weapon.ItemGladius;
import com.kitsu.medievalcraft.item.weapon.ItemHeavyMace;
@@ -174,23 +163,40 @@ public final class ModItems {
//-----------------------FINISHED TOOL COMBOS-----------------------///
public static Item customIronPick;
public static Item customIronPick1;
public static Item customIronPick2;
public static Item customIronPick3;
public static Item customIronPick4;
public static Item customStrongIronPick;
public static Item customWeakIronPick;
public static Item customHandleIronPick;
public static Item customHandleStrongIronPick;
public static Item customIronShovel0;
public static Item customIronShovel1;
public static Item customIronShovel2;
public static Item customIronShovel3;
public static Item customIronShovel;
public static Item customStrongIronShovel;
public static Item customWeakIronShovel;
public static Item customHandleIronShovel;
public static Item customHandleStrongIronShovel;
public static Item customIronLumberAxe0;
public static Item customIronLumberAxe1;
public static Item customIronLumberAxe2;
public static Item customIronLumberAxe3;
public static Item customIronLumberAxe;
public static Item customStrongIronLumberAxe;
public static Item customWeakIronLumberAxe;
public static Item customHandleIronLumberAxe;
public static Item customHandleStrongIronLumberAxe;
public static Item customIronHoe;
//-----------------------CLAYFORMS-----------------------///
public static Item pickaxeClayForm;
public static Item spadeHeadClayForm;
@@ -755,27 +761,45 @@ public final class ModItems {
GameRegistry.registerItem(heavyMace = new ItemHeavyMace("heavyMace", heavymacemat), "heavyMace");
GameRegistry.registerItem(battleAxe = new ItemBattleAxe("battleAxe", heavymacemat), "battleAxe");
//Silk Touch
GameRegistry.registerItem(customIronPick1 = new CustomIronPick("customIronPick1", customWoodWeak), "customIronPick1");
GameRegistry.registerItem(customIronPick2 = new CustomIronPick("customIronPick2", customWoodNormal), "customIronPick2");
GameRegistry.registerItem(customIronPick3 = new CustomIronPick("customIronPick3", customIronToolRodWeak), "customIronPick3");
GameRegistry.registerItem(customIronPick4 = new CustomIronPick("customIronPick4", customIronToolRodWeak), "customIronPick4");
GameRegistry.registerItem(customIronPick = new CustomIronPick("customIronPick", customWoodNormal), "customIronPick");
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");
*/
//SilkTouch Numbers
GameRegistry.registerItem(customIronShovel0 = new CustomIronShovel("customIronShovel0", customWoodWeak), "customIronShovel0");
GameRegistry.registerItem(customIronShovel1 = new CustomIronShovel("customIronShovel1", customIronToolRodWeak), "customIronShovel1");
GameRegistry.registerItem(customIronShovel2 = new CustomIronShovel("customIronShovel2", customWoodNormal), "customIronShovel2");
GameRegistry.registerItem(customIronShovel3 = new CustomIronShovel("customIronShovel3", customIronToolRodWeak), "customIronShovel3");
GameRegistry.registerItem(customIronShovel = new CustomIronShovel("customIronShovel", customWoodNormal), "customIronShovel");
GameRegistry.registerItem(customStrongIronShovel = new CustomStrongIronShovel("customStrongIronShovel", customWoodStrong), "customStrongIronShovel");
GameRegistry.registerItem(customWeakIronShovel = new CustomWeakIronShovel("customWeakIronShovel", customWoodWeak), "customWeakIronShovel");
GameRegistry.registerItem(customHandleIronShovel = new CustomHandleIronShovel("customHandleIronShovel", customIronToolRodNormal), "customHandleIronShovel");
GameRegistry.registerItem(customHandleStrongIronShovel = new CustomHandleStrongIronShovel("customHandleStrongIronShovel", customIronToolRodStrong), "customHandleStrongIronShovel");
GameRegistry.registerItem(customStrongIronShovel = new CustomIronShovel("customStrongIronShovel", customWoodStrong), "customStrongIronShovel");
GameRegistry.registerItem(customWeakIronShovel = new CustomIronShovel("customWeakIronShovel", customWoodWeak), "customWeakIronShovel");
GameRegistry.registerItem(customHandleIronShovel = new CustomIronShovel("customHandleIronShovel", customIronToolRodNormal), "customHandleIronShovel");
GameRegistry.registerItem(customHandleStrongIronShovel = new CustomIronShovel("customHandleStrongIronShovel", customIronToolRodStrong), "customHandleStrongIronShovel");
//Silk Touch
GameRegistry.registerItem(customIronLumberAxe0 = new CustomIronLumberAxe("customIronLumberAxe0", customWoodWeak), "customIronLumberAxe0");
GameRegistry.registerItem(customIronLumberAxe1 = new CustomIronLumberAxe("customIronLumberAxe1", customWoodNormal), "customIronLumberAxe1");
GameRegistry.registerItem(customIronLumberAxe2 = new CustomIronLumberAxe("customIronLumberAxe2", customIronToolRodWeak), "customIronLumberAxe2");
GameRegistry.registerItem(customIronLumberAxe3 = new CustomIronLumberAxe("customIronLumberAxe3", customIronToolRodWeak), "customIronLumberAxe3");
GameRegistry.registerItem(customIronLumberAxe = new CustomIronLumberAxe("customIronLumberAxe", customWoodNormal), "customIronLumberAxe");
GameRegistry.registerItem(customStrongIronLumberAxe = new CustomStrongIronLumberAxe("customStrongIronLumberAxe", customWoodStrong), "customStrongIronLumberAxe");
GameRegistry.registerItem(customWeakIronLumberAxe = new CustomWeakIronLumberAxe("customWeakIronLumberAxe", customWoodWeak), "customWeakIronLumberAxe");
GameRegistry.registerItem(customHandleIronLumberAxe = new CustomHandleIronLumberAxe("customHandleIronLumberAxe", customIronToolRodNormal), "customHandleIronLumberAxe");
GameRegistry.registerItem(customHandleStrongIronLumberAxe = new CustomHandleStrongIronLumberAxe("customHandleStrongIronLumberAxe", customIronToolRodStrong), "customHandleStrongIronLumberAxe");
GameRegistry.registerItem(customStrongIronLumberAxe = new CustomIronLumberAxe("customStrongIronLumberAxe", customWoodStrong), "customStrongIronLumberAxe");
GameRegistry.registerItem(customWeakIronLumberAxe = new CustomIronLumberAxe("customWeakIronLumberAxe", customWoodWeak), "customWeakIronLumberAxe");
GameRegistry.registerItem(customHandleIronLumberAxe = new CustomIronLumberAxe("customHandleIronLumberAxe", customIronToolRodNormal), "customHandleIronLumberAxe");
GameRegistry.registerItem(customHandleStrongIronLumberAxe = new CustomIronLumberAxe("customHandleStrongIronLumberAxe", customIronToolRodStrong), "customHandleStrongIronLumberAxe");
GameRegistry.registerItem(customIronHoe = new CustomIronHoe("customIronHoe", customWoodNormal), "customIronHoe");
}
}

View File

@@ -1,47 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomHandleIronLumberAxe extends ItemAxe{
private String name = "customHandleIronLumberAxe";
private Item item;
public CustomHandleIronLumberAxe(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customHandleIronLumberAxe");
this.toolMaterial = ModItems.customIronToolRodNormal;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,47 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomHandleIronPick extends ItemPickaxe{
private String name = "customHandleIronPick";
private Item item;
public CustomHandleIronPick(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customHandleIronPick");
this.toolMaterial = ModItems.customIronToolRodNormal;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,47 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomHandleIronShovel extends ItemSpade{
private String name = "customHandleIronShovel";
private Item item;
public CustomHandleIronShovel(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + name);
this.toolMaterial = ModItems.customIronToolRodNormal;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,47 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomHandleStrongIronLumberAxe extends ItemAxe{
private String name = "customHandleStrongIronLumberAxe";
private Item item;
public CustomHandleStrongIronLumberAxe(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customHandleIronLumberAxe");
this.toolMaterial = ModItems.customIronToolRodStrong;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,48 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomHandleStrongIronPick extends ItemPickaxe{
private String name = "customHandleStrongIronPick";
private Item item;
public CustomHandleStrongIronPick(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customHandleIronPick");
this.toolMaterial = ModItems.customIronToolRodStrong;
this.setHarvestLevel(name, 3);
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,48 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomHandleStrongIronShovel extends ItemSpade{
private String name = "customHandleStrongIronPick";
private Item item;
public CustomHandleStrongIronShovel(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customHandleIronShovel");
this.toolMaterial = ModItems.customIronToolRodStrong;
this.setHarvestLevel(name, 3);
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -0,0 +1,55 @@
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.ItemHoe;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item.ToolMaterial;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomIronHoe extends ItemHoe{
//private String name = "customIronPick";
//private Item item;
public CustomIronHoe(String name, ToolMaterial mat) {
super(mat);
//item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + name);
//this.toolMaterial = ModItems.customWoodNormal;
//GameRegistry.registerItem(this, name);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
list.add("Uses Left: " + Integer.toString(stack.getMaxDamage()-stack.getItemDamage()));
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

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.ItemAxe;
@@ -17,31 +20,35 @@ public class CustomIronLumberAxe extends ItemAxe{
private String name = "customIronLumberAxe";
private Item item;
public CustomIronLumberAxe(String name, ToolMaterial mat) {
super(mat);
item = this;
//item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
this.toolMaterial = ModItems.customWoodNormal;
//this.toolMaterial = ModItems.customWoodNormal;
setTextureName(Main.MODID + ":" + name);
GameRegistry.registerItem(this, name);
//GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4){
list.add("Uses Left: " + Integer.toString(stack.getMaxDamage()-stack.getItemDamage()));
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -7,6 +7,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
@@ -19,7 +20,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class CustomIronPick extends ItemPickaxe{
//private String name = "customIronPick";
//private Item item;
public CustomIronPick(String name, ToolMaterial mat) {
super(mat);
//item = this;
@@ -29,403 +30,31 @@ public class CustomIronPick extends ItemPickaxe{
//this.toolMaterial = ModItems.customWoodNormal;
//GameRegistry.registerItem(this, name);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
list.add("");
list.add("Uses Left: " + Integer.toString(stack.getMaxDamage()-stack.getItemDamage()));
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
/*
public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
/*if(CraftingHandle.flag == 1) {
par1ItemStack.addEnchantment(Enchantment.silkTouch, 1);
}
//customWoodNormal = EnumHelper.addToolMaterial("WOODNORMAL", 2, 400, 6.5F, 2, 0);
//customWoodStrong = EnumHelper.addToolMaterial("WOODSTRONG", 3, 500, 7.0F, 2, 0);
//customWoodWeak = EnumHelper.addToolMaterial("WOODWEAK", 2, 300, 6.0F, 2, 0);
//customIronToolStrong = EnumHelper.addToolMaterial("IRONSTRONG", 3, 400, 7.0F, 2, 0);
//customIronToolRodNormal = EnumHelper.addToolMaterial("IRONNORMAL", 2, 300, 7.0F, 2, 0);
//customIronToolRodWeak = EnumHelper.addToolMaterial("IRONWEAK", 2, 250, 7.0F, 2, 0);
switch (CraftingHandle.craftflag){
//SILK TOUCH TOOLS
case 1: { CraftingHandle.craftflag = 1;
//par1ItemStack.addEnchantment(Enchantment.silkTouch, 1);
this.toolMaterial = ModItems.customWoodWeak;
} break;
case 2: { CraftingHandle.craftflag = 2;
par1ItemStack.addEnchantment(Enchantment.silkTouch, 1);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodNormal;
} break;
case 3: { CraftingHandle.craftflag = 3;
par1ItemStack.addEnchantment(Enchantment.silkTouch, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customWoodWeak;
} break;
// FULL IRON PICK
case 4: { CraftingHandle.craftflag = 4;
par1ItemStack.addEnchantment(Enchantment.silkTouch, 1);
this.toolMaterial = ModItems.customIronToolRodNormal;
} break;
//UNBREAKING TOOLS
case 5: { CraftingHandle.craftflag = 5;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodNormal;
} break;
case 6: { CraftingHandle.craftflag = 6;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
this.toolMaterial = ModItems.customWoodNormal;
} break;
case 7: { CraftingHandle.craftflag = 7;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodNormal;
} break;
case 8: { CraftingHandle.craftflag = 8;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customIronToolRodNormal;
} break;
case 9: { CraftingHandle.craftflag = 9;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
} break;
case 10: {CraftingHandle.craftflag = 10;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
}
break;
case 11: { CraftingHandle.craftflag = 11;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
//this.toolMaterial = ModItems.customWoodStrong;
} break;
case 12: { CraftingHandle.craftflag = 12;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 3);
//this.toolMaterial = ModItems.customWoodStrong;
break;
}
case 13: { CraftingHandle.craftflag = 13;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
//this.toolMaterial = ModItems.customWoodStrong;
} break;
case 14: { CraftingHandle.craftflag = 14;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
this.toolMaterial = ModItems.customIronToolStrong;
} break;
case 15: { CraftingHandle.craftflag = 15;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolStrong;
} break;
case 16: CraftingHandle.craftflag = 16;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolStrong;
break;
//FORTUNE TOOLS
case 17: CraftingHandle.craftflag = 17;
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 18: CraftingHandle.craftflag = 18;
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 19: CraftingHandle.craftflag = 19;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customWoodWeak;
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack){
return false;
}
break;
@Override
public void onCreated(ItemStack stack, World world, EntityPlayer player) {
case 20: CraftingHandle.craftflag = 20;
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 21: CraftingHandle.craftflag = 21;
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 22: CraftingHandle.craftflag = 22;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 23: CraftingHandle.craftflag = 23;
this.toolMaterial = ModItems.customWoodWeak;
break;
case 24: CraftingHandle.craftflag = 24;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 25: CraftingHandle.craftflag = 25;
//this.toolMaterial = ModItems.customWoodWeak;
par1ItemStack.addEnchantment(Enchantment.fortune, 3);
break;
case 26: CraftingHandle.craftflag = 26;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 27: CraftingHandle.craftflag = 27;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 28: CraftingHandle.craftflag = 28;
par1ItemStack.addEnchantment(Enchantment.fortune, 3);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
// EFFIC TOOLS
case 29: CraftingHandle.craftflag = 29;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 30: CraftingHandle.craftflag = 30;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 31: CraftingHandle.craftflag = 31;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 32: CraftingHandle.craftflag = 32;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 33: CraftingHandle.craftflag = 33;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 34: CraftingHandle.craftflag = 34;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 35: CraftingHandle.craftflag = 35;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 36: CraftingHandle.craftflag = 36;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 37: CraftingHandle.craftflag = 37;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 38: CraftingHandle.craftflag = 38;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 39: CraftingHandle.craftflag = 39;
par1ItemStack.addEnchantment(Enchantment.efficiency, 3);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 40: CraftingHandle.craftflag = 40;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
// EFFIC & FORTUNE HEAD
case 41: CraftingHandle.craftflag = 41;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 42: CraftingHandle.craftflag = 42;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 43: CraftingHandle.craftflag = 43;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 44: CraftingHandle.craftflag = 44;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 45: CraftingHandle.craftflag = 45;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 46: CraftingHandle.craftflag = 46;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
//UNBREAKING & EFFIC HEAD
case 47: CraftingHandle.craftflag = 47;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 48: CraftingHandle.craftflag = 48;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 49: CraftingHandle.craftflag = 49;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 50: CraftingHandle.craftflag = 50;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodNormal;
break;
case 51: CraftingHandle.craftflag = 51;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 52: CraftingHandle.craftflag = 52;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
//UNBREAKING & FORTUNE HEAD
case 53: CraftingHandle.craftflag = 53;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 54: CraftingHandle.craftflag = 54;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 55: CraftingHandle.craftflag = 55;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 56: CraftingHandle.craftflag = 56;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodNormal;
break;
case 57: CraftingHandle.craftflag = 57;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 58: CraftingHandle.craftflag = 58;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
}
}*/
}
}

View File

@@ -1,405 +1,51 @@
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.ItemSpade;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomIronShovel extends ItemSpade{
private String name = "customIronShovel";
private Item item;
public CustomIronShovel(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
this.toolMaterial = ModItems.customWoodNormal;
setTextureName(Main.MODID + ":" + name);
GameRegistry.registerItem(this, name);
//item = this;
this.setUnlocalizedName(name);
this.setCreativeTab(CustomTab.MedievalCraftTab);
this.setTextureName(Main.MODID + ":" + name);
//this.toolMaterial = ModItems.customWoodNormal;
//GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair) {
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4){
list.add("Uses Left: " + Integer.toString(stack.getMaxDamage()-stack.getItemDamage()));
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair) {
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack){
return false;
}
/*public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
//customWoodNormal = EnumHelper.addToolMaterial("WOODNORMAL", 2, 400, 6.5F, 2, 0);
//customWoodStrong = EnumHelper.addToolMaterial("WOODSTRONG", 3, 500, 7.0F, 2, 0);
//customWoodWeak = EnumHelper.addToolMaterial("WOODWEAK", 2, 300, 6.0F, 2, 0);
//customIronToolStrong = EnumHelper.addToolMaterial("IRONSTRONG", 3, 400, 7.0F, 2, 0);
//customIronToolRodNormal = EnumHelper.addToolMaterial("IRONNORMAL", 2, 300, 7.0F, 2, 0);
//customIronToolRodWeak = EnumHelper.addToolMaterial("IRONWEAK", 2, 250, 7.0F, 2, 0);
switch (CraftingHandle.craftflag){
//SILK TOUCH TOOLS
case 1: CraftingHandle.craftflag = 1;
par1ItemStack.addEnchantment(Enchantment.silkTouch, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 2: CraftingHandle.craftflag = 2;
par1ItemStack.addEnchantment(Enchantment.silkTouch, 1);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 3: CraftingHandle.craftflag = 3;
par1ItemStack.addEnchantment(Enchantment.silkTouch, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
// FULL IRON PICK
case 4: CraftingHandle.craftflag = 4;
par1ItemStack.addEnchantment(Enchantment.silkTouch, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
//UNBREAKING TOOLS
case 5: CraftingHandle.craftflag = 5;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 6: CraftingHandle.craftflag = 6;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 7: CraftingHandle.craftflag = 7;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 8: CraftingHandle.craftflag = 8;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customIronToolRodNormal;
break;
case 9: CraftingHandle.craftflag = 9;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 10: CraftingHandle.craftflag = 10;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 11: CraftingHandle.craftflag = 11;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
this.toolMaterial = ModItems.customWoodStrong;
break;
case 12: CraftingHandle.craftflag = 12;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 3);
this.toolMaterial = ModItems.customWoodStrong;
break;
case 13: CraftingHandle.craftflag = 13;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodStrong;
break;
case 14: CraftingHandle.craftflag = 14;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
this.toolMaterial = ModItems.customIronToolStrong;
break;
case 15: CraftingHandle.craftflag = 15;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolStrong;
break;
case 16: CraftingHandle.craftflag = 16;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolStrong;
break;
//FORTUNE TOOLS
case 17: CraftingHandle.craftflag = 17;
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 18: CraftingHandle.craftflag = 18;
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 19: CraftingHandle.craftflag = 19;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 20: CraftingHandle.craftflag = 20;
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 21: CraftingHandle.craftflag = 21;
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 22: CraftingHandle.craftflag = 22;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 23: CraftingHandle.craftflag = 23;
this.toolMaterial = ModItems.customWoodWeak;
break;
case 24: CraftingHandle.craftflag = 24;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 25: CraftingHandle.craftflag = 25;
par1ItemStack.addEnchantment(Enchantment.fortune, 3);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 26: CraftingHandle.craftflag = 26;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 27: CraftingHandle.craftflag = 27;
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 28: CraftingHandle.craftflag = 28;
par1ItemStack.addEnchantment(Enchantment.fortune, 3);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
// EFFIC TOOLS
case 29: CraftingHandle.craftflag = 29;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 30: CraftingHandle.craftflag = 30;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 31: CraftingHandle.craftflag = 31;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 32: CraftingHandle.craftflag = 32;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 33: CraftingHandle.craftflag = 33;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 34: CraftingHandle.craftflag = 34;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 35: CraftingHandle.craftflag = 35;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 36: CraftingHandle.craftflag = 36;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 37: CraftingHandle.craftflag = 37;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 38: CraftingHandle.craftflag = 38;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 39: CraftingHandle.craftflag = 39;
par1ItemStack.addEnchantment(Enchantment.efficiency, 3);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 40: CraftingHandle.craftflag = 40;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
// EFFIC & FORTUNE HEAD
case 41: CraftingHandle.craftflag = 41;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 42: CraftingHandle.craftflag = 42;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 43: CraftingHandle.craftflag = 43;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customWoodWeak;
break;
case 44: CraftingHandle.craftflag = 44;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 45: CraftingHandle.craftflag = 45;
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 46: CraftingHandle.craftflag = 46;
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
//UNBREAKING & EFFIC HEAD
case 47: CraftingHandle.craftflag = 47;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 48: CraftingHandle.craftflag = 48;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 49: CraftingHandle.craftflag = 49;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 50: CraftingHandle.craftflag = 50;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
this.toolMaterial = ModItems.customIronToolRodNormal;
break;
case 51: CraftingHandle.craftflag = 51;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 52: CraftingHandle.craftflag = 52;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
//UNBREAKING & FORTUNE HEAD
case 53: CraftingHandle.craftflag = 53;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 54: CraftingHandle.craftflag = 54;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 2);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 55: CraftingHandle.craftflag = 55;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customWoodNormal;
break;
case 56: CraftingHandle.craftflag = 56;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodNormal;
break;
case 57: CraftingHandle.craftflag = 57;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.efficiency, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 1);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
case 58: CraftingHandle.craftflag = 58;
par1ItemStack.addEnchantment(Enchantment.unbreaking, 1);
par1ItemStack.addEnchantment(Enchantment.fortune, 2);
this.toolMaterial = ModItems.customIronToolRodWeak;
break;
}
}*/
}

View File

@@ -1,46 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomStrongIronLumberAxe extends ItemAxe{
private String name = "customStrongLumberAxe";
private Item item;
public CustomStrongIronLumberAxe(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customIronLumberAxe");
this.toolMaterial = ModItems.customWoodStrong;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,46 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomStrongIronPick extends ItemPickaxe{
private String name = "customStrongIronPick";
private Item item;
public CustomStrongIronPick(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customIronPick");
this.toolMaterial = ModItems.customWoodStrong;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,46 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomStrongIronShovel extends ItemSpade{
private String name = "customStrongIronShovel";
private Item item;
public CustomStrongIronShovel(String name, ToolMaterial mat) {
super(mat);
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
this.toolMaterial = ModItems.customWoodStrong;
setTextureName(Main.MODID + ":" + "customIronShovel");
item = this;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair) {
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,46 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomWeakIronLumberAxe extends ItemAxe{
private String name = "customWeakIronLumberAxe";
private Item item;
public CustomWeakIronLumberAxe(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customIronLumberAxe");
this.toolMaterial = ModItems.customWoodWeak;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,46 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomWeakIronPick extends ItemPickaxe{
private String name = "customWeakIronPick";
private Item item;
public CustomWeakIronPick(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customIronPick");
this.toolMaterial = ModItems.customWoodWeak;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -1,46 +0,0 @@
package com.kitsu.medievalcraft.item.tools;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.item.ModItems;
import com.kitsu.medievalcraft.util.CustomTab;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class CustomWeakIronShovel extends ItemSpade{
private String name = "customWeakIronShovel";
private Item item;
public CustomWeakIronShovel(String name, ToolMaterial mat) {
super(mat);
item = this;
setUnlocalizedName(name);
setCreativeTab(CustomTab.MedievalCraftTab);
setTextureName(Main.MODID + ":" + "customIronShovel");
this.toolMaterial = ModItems.customWoodWeak;
GameRegistry.registerItem(this, name);
}
@Override
public int getItemEnchantability () {
return 0;
}
@Override
public boolean getIsRepairable(ItemStack item, ItemStack repair)
{
return Items.iron_ingot == repair.getItem() ? true : false;
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack)
{
return false;
}
}

View File

@@ -82,12 +82,15 @@ public class ForgeRenderer extends TileEntitySpecialRenderer {
tileEntity.markForUpdate();
tileEntity.markDirty();
}
/*if(tileEntity.isOn==false && tileEntity.isBurning==false){
if(tile.getBlockMetadata()<4){
loc = TEXTURE;
}
if(tileEntity.isOn==false && tileEntity.isBurning==true){
if(tile.getBlockMetadata()>3&&tile.getBlockMetadata()<8){
loc = TEXTURE1;
}*/
}
if(tile.getBlockMetadata()>7){
loc = TEXTURE2;
}
if(loc == null){
loc = TEXTURE;

View File

@@ -222,7 +222,9 @@ public class TileEntityFirebox extends TileEntity implements IInventory{
private void fireboxMaint(World world, int x, int y, int z){
if((this.getStackInSlot(0)==null)&&(world.getBlockMetadata(x, y, z)==1)){
world.setBlockMetadataWithNotify(x, y, z, 0, 3);
world.getBlock(x, y, z).setLightLevel(0f);
this.markForUpdate();
this.markDirty();
//world.getBlock(x, y, z).setLightLevel(0f);
}
if(world.getBlockMetadata(x, y, z)==1 && world.getBlock(x, y+1, z).equals(Blocks.air)){
world.setBlock(x, y+1, z, Blocks.fire, 0, 2);

View File

@@ -243,6 +243,9 @@ public class TileForge extends TileEntity implements IInventory{
double burnTime = (this.getItemBurnTime(stack)+((fuelMulti(stack.stackSize, stack)*this.getItemBurnTime(stack))));
//System.out.println(this.ticks+" "+ burnTime+" "+this.getStackInSlot(0).stackSize);
if(time >= burnTime){
if(this.getStackInSlot(0).stackSize==1){
this.setInventorySlotContents(0, null);
}
decrStackSize(0, 1);
this.ticks=0;
}
@@ -261,6 +264,9 @@ public class TileForge extends TileEntity implements IInventory{
double burnTime = 1.5*(this.getItemBurnTime(stack)+((fuelMulti(stack.stackSize, stack)*this.getItemBurnTime(stack))));
//System.out.println(this.ticks+" "+ burnTime+" "+this.getStackInSlot(0).stackSize);
if(time >= burnTime){
if(this.getStackInSlot(0).stackSize==1){
this.setInventorySlotContents(0, null);
}
decrStackSize(0, 1);
this.ticks=0;
}
@@ -336,23 +342,27 @@ public class TileForge extends TileEntity implements IInventory{
if(this.getStackInSlot(0)==null){
if(world.getBlockMetadata(x, y, z)>=4&&world.getBlockMetadata(x, y, z)<=7){
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)-4, 3);
world.getBlock(x, y, z).setLightLevel(0f);
this.markDirty();
this.markForUpdate();
//world.getBlock(x, y, z).setLightLevel(0f);
}
}
if(this.getStackInSlot(0)==null){
if(world.getBlockMetadata(x, y, z)>7){
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)-8, 3);
world.getBlock(x, y, z).setLightLevel(0f);
this.markDirty();
this.markForUpdate();
//world.getBlock(x, y, z).setLightLevel(0f);
}
}
if(this.getStackInSlot(1)==null){
if(world.getBlockMetadata(x, y, z)>=8){
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)-4, 2);
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)-4, 3);
}
}
if(world.getBlockMetadata(x, y, z)>3&&world.getBlockMetadata(x, y, z)<8){
if(this.getStackInSlot(1)!=null && (world.canBlockSeeTheSky(x, y+1, z)==true)){
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)+4, 2);
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z)+4, 3);
}
}
if(world.getBlockMetadata(x, y, z)>7){