Chisel Start

This commit is contained in:
mDiyo 2013-04-27 01:06:09 -07:00
parent 4c8b172068
commit 0080dd934a
107 changed files with 812 additions and 577 deletions

View File

@ -1,10 +1,12 @@
package mods.tinker.common;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import mods.tinker.tconstruct.library.ToolCore;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -157,4 +159,9 @@ public abstract class ToolMod
}
}
}
public boolean validType(ToolCore tool)
{
return true;
}
}

View File

@ -97,7 +97,7 @@ The structure must be a 5x5 shell due to the amount of heat lava gives off. Ther
<page type="text">
<text>Larger basins will hold more metal, of course, and the Controller can be on any level so long as there is a lava tank to match.
When you are ready to pour liquid metal from the Smeltery, put a faucet on a drain and a casting table below it.
When you are ready to pour liquid metal from the Smeltery, put a faucet on a drain and a casting table below it.
Other liquid removal objects will work, but are frowned upon. An example picture is provided for your convienence.</text>
</page>
@ -127,6 +127,14 @@ Other liquid removal objects will work, but are frowned upon. An example picture
</item>
</page>
<page type="sidebar">
<text>Blank casts are made by pouring aluminum brass or gold into an empty casting table.</text>
<item>
<text>Blank Cast</text>
<icon>blankcast</icon>
</item>
</page>
<page type="crafting">
<text>Grout</text>
<recipe>

View File

@ -28,7 +28,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry;
* @dependencies: IC2 API, EBXL API
*/
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.2.dev1", dependencies = "required-after:Forge@[7.7.1.659,)")
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.2.dev23", dependencies = "required-after:Forge@[7.7.1.659,)")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.TPacketHandler.class)
public class TConstruct
{

View File

@ -16,6 +16,7 @@ import mods.tinker.tconstruct.blocks.StoneTorch;
import mods.tinker.tconstruct.blocks.TConstructBlock;
import mods.tinker.tconstruct.blocks.TMetalBlock;
import mods.tinker.tconstruct.blocks.ToolStationBlock;
import mods.tinker.tconstruct.blocks.infiblocks.SpeedBlock;
import mods.tinker.tconstruct.crafting.LiquidBlockCasting;
import mods.tinker.tconstruct.crafting.LiquidCasting;
import mods.tinker.tconstruct.crafting.PatternBuilder;
@ -44,6 +45,7 @@ import mods.tinker.tconstruct.items.blocks.OreberryBushItem;
import mods.tinker.tconstruct.items.blocks.OreberryBushSecondItem;
import mods.tinker.tconstruct.items.blocks.SearedTableItemBlock;
import mods.tinker.tconstruct.items.blocks.SmelteryItemBlock;
import mods.tinker.tconstruct.items.blocks.SpeedBlockItem;
import mods.tinker.tconstruct.items.blocks.ToolStationItemBlock;
import mods.tinker.tconstruct.library.TConstructRegistry;
import mods.tinker.tconstruct.library.ToolCore;
@ -275,7 +277,7 @@ public class TContent implements IFuelHandler
String[] metalTypes = new String[] { "compressed_cobalt", "compressed_ardite", "compressed_manyullyn", "compressed_copper", "compressed_bronze", "compressed_tin", "compressed_aluminum",
"compressed_alubrass", "compressed_alumite", "compressed_steel" };
metalBlock = new TMetalBlock(PHConstruct.metalBlock, Material.iron, 10.0F, metalTypes);
metalBlock = new TMetalBlock(PHConstruct.metalBlock, Material.iron, 10.0F, metalTypes).setUnlocalizedName("tconstruct.metalblock");
metalBlock.stepSound = Block.soundMetalFootstep;
GameRegistry.registerBlock(metalBlock, MetalItemBlock.class, "MetalBlock");
@ -322,7 +324,7 @@ public class TContent implements IFuelHandler
GameRegistry.registerBlock(oreBerrySecond, OreberryBushSecondItem.class, "ore.berries.two");
String[] oreTypes = new String[] { "nether_slag", "nether_cobalt", "nether_ardite", "ore_copper", "ore_tin", "ore_aluminum", "ore_slag" };
oreSlag = new MetalOre(PHConstruct.oreSlag, Material.iron, 10.0F, oreTypes);
oreSlag = new MetalOre(PHConstruct.oreSlag, Material.iron, 10.0F, oreTypes).setUnlocalizedName("tconstruct.stoneore");
GameRegistry.registerBlock(oreSlag, MetalOreItemBlock.class, "SearedBrick");
MinecraftForge.setBlockHarvestLevel(oreSlag, 1, "pickaxe", 4);
MinecraftForge.setBlockHarvestLevel(oreSlag, 2, "pickaxe", 4);
@ -330,7 +332,7 @@ public class TContent implements IFuelHandler
MinecraftForge.setBlockHarvestLevel(oreSlag, 4, "pickaxe", 1);
MinecraftForge.setBlockHarvestLevel(oreSlag, 5, "pickaxe", 1);
oreGravel = new GravelOre(PHConstruct.oreGravel).setUnlocalizedName("GravelOre");
oreGravel = new GravelOre(PHConstruct.oreGravel).setUnlocalizedName("GravelOre").setUnlocalizedName("tconstruct.gravelore");
GameRegistry.registerBlock(oreGravel, GravelOreItem.class, "GravelOre");
MinecraftForge.setBlockHarvestLevel(oreGravel, 0, "shovel", 1);
@ -340,8 +342,8 @@ public class TContent implements IFuelHandler
MinecraftForge.setBlockHarvestLevel(oreGravel, 4, "shovel", 1);
MinecraftForge.setBlockHarvestLevel(oreGravel, 5, "shovel", 4);
/*speedBlock = new SpeedBlock(PHConstruct.speedBlock).setUnlocalizedName("SpeedBlock");
GameRegistry.registerBlock(speedBlock, SpeedBlockItem.class, "SpeedBlock");*/
speedBlock = new SpeedBlock(PHConstruct.speedBlock).setUnlocalizedName("SpeedBlock");
GameRegistry.registerBlock(speedBlock, SpeedBlockItem.class, "SpeedBlock");
/*redstoneBallRepeater = new RedstoneBallRepeater(PHConstruct.redstoneBallRepeater, false).setUnlocalizedName("decoration.redstoneballrepeater");
GameRegistry.registerBlock(redstoneBallRepeater, "decoration.redstoneballrepeater");
@ -688,6 +690,8 @@ public class TContent implements IFuelHandler
lbc.addBlockCastingRecipe(new ItemStack(metalBlock, 1, 8), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 10), null, true, 100); //alumite
lbc.addBlockCastingRecipe(new ItemStack(Block.obsidian), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 11), null, true, 100);// obsidian
lbc.addBlockCastingRecipe(new ItemStack(metalBlock, 1, 9), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 12), null, true, 100); //steel
lbc.addBlockCastingRecipe(new ItemStack(speedBlock, 1, 0), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue / 9, 3), new ItemStack(Block.gravel), true, 100); //steel
}
//WeakReference<ToolCore> tool = new WeakReference<ToolCore>(null);
@ -944,15 +948,15 @@ public class TContent implements IFuelHandler
{
ItemStack ironpick = ToolBuilder.instance.buildTool(new ItemStack(TContent.pickaxeHead, 1, 6), new ItemStack(TContent.toolRod, 1, 2), new ItemStack(TContent.binding, 1, 6), "");
/* IC2 */
ItemStack reBattery = ic2.api.Items.getItem("reBattery");
ItemStack reBattery = ic2.api.item.Items.getItem("reBattery");
if (reBattery != null)
modE.batteries.add(reBattery);
ItemStack chargedReBattery = ic2.api.Items.getItem("chargedReBattery");
ItemStack chargedReBattery = ic2.api.item.Items.getItem("chargedReBattery");
if (chargedReBattery != null)
{
modE.batteries.add(chargedReBattery);
}
ItemStack electronicCircuit = ic2.api.Items.getItem("electronicCircuit");
ItemStack electronicCircuit = ic2.api.item.Items.getItem("electronicCircuit");
if (electronicCircuit != null)
modE.circuits.add(electronicCircuit);

View File

@ -258,7 +258,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
return;
}
if (random1.nextInt(12) == 0)// && world.getBlockLightValue(x, y, z) <= 8)
if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <= 8)
{
int meta = world.getBlockMetadata(x, y, z);
if (world.getFullBlockLightValue(x, y, z) < 13)

View File

@ -416,11 +416,11 @@ public class TProxyClient extends TProxyCommon
{
TConstructClientRegistry.addMaterialRenderMapping(partIter, "tinker", partTypes[partIter], true);
}
for (int effectIter = 0; effectIter < 2; effectIter++)
for (int effectIter = 0; effectIter < 3; effectIter++)
{
TConstructClientRegistry.addEffectRenderMapping(effectIter, "tinker", effectTypes[effectIter], true);
}
for (int effectIter = 3; effectIter < effectTypes.length; effectIter++)
for (int effectIter = 4; effectIter < effectTypes.length; effectIter++)
{
TConstructClientRegistry.addEffectRenderMapping(effectIter, "tinker", effectTypes[effectIter], true);
}

View File

@ -348,7 +348,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
CastingBasinLogic logic = (CastingBasinLogic) world.getBlockTileEntity(x, y, z);
if (logic.liquid != null)
{
float height = logic.getLiquidAmount() / (logic.getCapacity() * 1.03F) * 0.6875F;
float height = logic.getLiquidAmount() / (logic.getCapacity() * 1.05F) * 0.6875F;
renderer.setRenderBounds(0.0625F, 0.25f, 0.0625F, 0.9375F, 0.25f + height, 0.9375F);
if (logic.liquid.itemID < 4096) //Block
{

View File

@ -90,6 +90,8 @@ public class DaggerRender extends Render
{
this.renderDroppedItem(rotator, icon, b0, par9, 1.0F, 1.0F, 1.0F);
}
GL11.glScalef(1.005f, 1.005f, 1.005f);
//GL11.glTranslatef(0F, -0.0025F, 0.0F);
}
}
else

View File

@ -457,8 +457,8 @@ public class RotatingBase extends Entity
rotationYaw = data.readFloat();
NBTTagCompound compound = new NBTTagCompound();
NBTTagCompound toolTag = new NBTTagCompound();
toolTag.setInteger("RenderHead", data.readInt());
toolTag.setInteger("RenderHandle", data.readInt());
toolTag.setInteger("RenderHead", data.readInt());
toolTag.setInteger("RenderAccessory", data.readInt());
switch (data.readInt())
{

View File

@ -1,7 +1,7 @@
package mods.tinker.tconstruct.library;
import ic2.api.ICustomElectricItem;
import ic2.api.IElectricItem;
import ic2.api.item.ICustomElectricItem;
import ic2.api.item.IElectricItem;
import java.util.Iterator;
import java.util.List;
@ -9,7 +9,6 @@ import java.util.Random;
import mods.tinker.common.PiercingEntityDamage;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.EnchantmentThorns;
import net.minecraft.entity.Entity;
@ -26,13 +25,11 @@ import net.minecraft.stats.AchievementList;
import net.minecraft.stats.StatList;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumMovingObjectType;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.Event.Result;
import net.minecraftforge.event.entity.player.UseHoeEvent;
import cpw.mods.fml.client.FMLClientHandler;
public class AbilityHelper
{

View File

@ -33,6 +33,8 @@ public abstract class DualHarvestTool extends HarvestTool
int bID = player.worldObj.getBlockId(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
Block block = Block.blocksList[bID];
if (block == null || bID < 1)
return false;
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
int shlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getSecondHarvestType());
@ -137,6 +139,12 @@ public abstract class DualHarvestTool extends HarvestTool
return false;
}
@Override
public String[] toolCategories()
{
return new String[] { "harvest", "dualharvest" };
}
protected abstract Material[] getEffectiveSecondaryMaterials();
protected abstract String getSecondHarvestType();
}

View File

@ -33,6 +33,8 @@ public abstract class HarvestTool extends ToolCore
int bID = player.worldObj.getBlockId(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
Block block = Block.blocksList[bID];
if (block == null || bID < 1)
return false;
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
if (hlvl <= tags.getInteger("HarvestLevel"))
@ -120,6 +122,12 @@ public abstract class HarvestTool extends ToolCore
}
return false;
}
@Override
public String[] toolCategories()
{
return new String[] { "harvest" };
}
protected abstract Material[] getEffectiveMaterials ();

View File

@ -1,7 +1,7 @@
package mods.tinker.tconstruct.library;
import ic2.api.IBoxable;
import ic2.api.ICustomElectricItem;
import ic2.api.item.IBoxable;
import ic2.api.item.ICustomElectricItem;
import java.util.HashMap;
import java.util.Iterator;
@ -426,10 +426,10 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
return ret;
}
/* Creative mode tools */
static String[] toolMaterialNames = { "Wooden ", "Stone ", "Iron ", "Flint ", "Cactus ", "Bone ", "Obsidian ", "Nethrrack ", "Slime ", "Paper ", "Cobalt ", "Ardite ", "Manyullyn ", "Copper ",
"Bronze ", "Alumite ", "Steel ", "Slime " };
/* Creative mode tools */
public void getSubItems (int id, CreativeTabs tab, List list)
{
for (int i = 0; i < 18; i++)
@ -450,6 +450,8 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
{
return TConstructRegistry.toolRod;
}
/* Updating */
public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5)
{
@ -469,6 +471,11 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
}
/* Tool uses */
//Types
public abstract String[] toolCategories();
//Mining
@Override
public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player)
{
@ -507,12 +514,6 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
return AbilityHelper.onBlockChanged(itemstack, world, bID, x, y, z, player, random);
}
@Override
public boolean hitEntity (ItemStack stack, EntityLiving mob, EntityLiving player)
{
return true;
}
@Override
public float getStrVsBlock (ItemStack stack, Block block, int meta)
{
@ -522,24 +523,7 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
return 1f;
}
//Vanilla repairs
public boolean isItemTool (ItemStack par1ItemStack)
{
return false;
}
@Override
public boolean getIsRepairable (ItemStack par1ItemStack, ItemStack par2ItemStack)
{
return false;
}
public boolean isRepairable()
{
return false;
}
/* Attacking */
// Attacking
@Override
public boolean onLeftClickEntity (ItemStack stack, EntityPlayer player, Entity entity)
{
@ -547,12 +531,13 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
return true;
}
public boolean pierceArmor ()
@Override
public boolean hitEntity (ItemStack stack, EntityLiving mob, EntityLiving player)
{
return false;
return true;
}
public boolean rangedTool ()
public boolean pierceArmor ()
{
return false;
}
@ -567,23 +552,11 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
return this.damageVsEntity;
}
/* Enchanting */
public int getItemEnchantability ()
{
return 0;
}
//Changes how much durability the base tool has
public float getDurabilityModifier ()
{
return 1f;
}
public boolean isFull3D ()
{
return true;
}
/*
* IC2 Support
* Every tool can be an electric tool if you modify it right
@ -725,4 +698,32 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
{
return false;
}
//Vanilla overrides
public boolean isItemTool (ItemStack par1ItemStack)
{
return false;
}
@Override
public boolean getIsRepairable (ItemStack par1ItemStack, ItemStack par2ItemStack)
{
return false;
}
public boolean isRepairable()
{
return false;
}
public int getItemEnchantability ()
{
return 0;
}
public boolean isFull3D ()
{
return true;
}
}

View File

@ -80,7 +80,7 @@ public abstract class Weapon extends ToolCore
}
return super.canHarvestBlock(block);
}
protected Material[] getEffectiveMaterials()
{
return web;
@ -92,11 +92,18 @@ public abstract class Weapon extends ToolCore
return 1;
}
@Override
public boolean onLeftClickEntity (ItemStack stack, EntityPlayer player, Entity entity)
{
TContent.modL.midStreamModify(stack);
return super.onLeftClickEntity(stack, player, entity);
}
@Override
public String[] toolCategories()
{
return new String[] { "weapon", "melee" };
}
public static Material[] web = new Material[] { Material.web };
public static Material[] none = new Material[0];

View File

@ -19,216 +19,215 @@ import net.minecraftforge.liquids.ILiquidTank;
import net.minecraftforge.liquids.ITankContainer;
import net.minecraftforge.liquids.LiquidStack;
public class CastingBasinLogic extends InventoryLogic
implements ILiquidTank, ITankContainer, ISidedInventory
public class CastingBasinLogic extends InventoryLogic implements ILiquidTank, ITankContainer, ISidedInventory
{
public LiquidStack liquid;
int castingDelay = 0;
int renderOffset = 0;
boolean needsUpdate;
int tick;
public LiquidStack liquid;
int castingDelay = 0;
int renderOffset = 0;
boolean needsUpdate;
int tick;
public CastingBasinLogic()
{
super(2);
}
@Override
public CastingBasinLogic()
{
super(2);
}
@Override
public int getInventoryStackLimit ()
{
return 1;
}
@Override
public String getInvName () //Not a gui block
{
return null;
}
@Override
public String getInvName () //Not a gui block
{
return null;
}
@Override
protected String getDefaultName () //Still not a gui block
{
return null;
}
@Override
protected String getDefaultName () //Still not a gui block
{
return null;
}
@Override
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) //Definitely not a gui block
{
return null;
}
@Override
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) //Definitely not a gui block
{
return null;
}
/* Tank */
@Override
public LiquidStack getLiquid ()
{
return liquid;
}
/* Tank */
@Override
public LiquidStack getLiquid ()
{
return liquid;
}
@Override
public int getCapacity ()
{
int ret = TConstruct.ingotLiquidValue;
ItemStack inv = inventory[0];
if (inv != null && inv.getItem() instanceof IPattern)
ret *= ((IPattern) inv.getItem()).getPatternCost(inv.getItemDamage()) * 0.5;
else
ret = LiquidBlockCasting.instance.getCastingAmount(liquid, inv);
return ret;
}
@Override
public int getCapacity ()
{
int ret = TConstruct.ingotLiquidValue;
@Override
public int fill (LiquidStack resource, boolean doFill)
{
if (doFill)
needsUpdate = true;
if (resource == null)
return 0;
ItemStack inv = inventory[0];
if (liquid == null)
{
if (inventory[1] == null && LiquidBlockCasting.instance.getCastingRecipe(resource, inventory[0]) != null)
{
liquid = resource.copy();
int capacity = getCapacity();
if (liquid.amount > capacity)
{
liquid.amount = capacity;
}
if (liquid.amount == capacity)
{
castingDelay = LiquidBlockCasting.instance.getCastingDelay(liquid, inventory[0]);
}
renderOffset = liquid.amount;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
return liquid.amount;
}
else
return 0;
}
else if (resource.itemID != liquid.itemID || resource.itemMeta != liquid.itemMeta)
{
return 0;
}
else if (resource.amount + liquid.amount >= getCapacity()) //Start timer here
{
int total = getCapacity();
int cap = total - liquid.amount;
if (doFill && cap != total)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
liquid.amount = getCapacity();
if (castingDelay <= 0)
{
castingDelay = LiquidBlockCasting.instance.getCastingDelay(liquid, inventory[0]);
}
}
renderOffset = cap;
return cap;
}
else
{
if (doFill)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
liquid.amount += resource.amount;
}
return resource.amount;
}
}
@Override
public void onInventoryChanged()
{
super.onInventoryChanged();
if (inv != null && inv.getItem() instanceof IPattern)
ret *= ((IPattern) inv.getItem()).getPatternCost(inv.getItemDamage()) * 0.5;
else
ret = LiquidBlockCasting.instance.getCastingAmount(liquid, inv);
return ret;
}
@Override
public int fill (LiquidStack resource, boolean doFill)
{
if (doFill)
needsUpdate = true;
if (resource == null)
return 0;
if (liquid == null)
{
if (inventory[1] == null && LiquidBlockCasting.instance.getCastingRecipe(resource, inventory[0]) != null)
{
liquid = resource.copy();
int capacity = getCapacity();
if (liquid.amount > capacity)
{
liquid.amount = capacity;
}
if (liquid.amount == capacity)
{
castingDelay = LiquidBlockCasting.instance.getCastingDelay(liquid, inventory[0]);
}
renderOffset = liquid.amount;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
return liquid.amount;
}
else
return 0;
}
else if (resource.itemID != liquid.itemID || resource.itemMeta != liquid.itemMeta)
{
return 0;
}
else if (resource.amount + liquid.amount >= getCapacity()) //Start timer here
{
int total = getCapacity();
int cap = total - liquid.amount;
if (doFill && cap != total)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
liquid.amount = getCapacity();
if (castingDelay <= 0)
{
castingDelay = LiquidBlockCasting.instance.getCastingDelay(liquid, inventory[0]);
}
}
renderOffset = cap;
return cap;
}
else
{
if (doFill)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
liquid.amount += resource.amount;
}
return resource.amount;
}
}
@Override
public void onInventoryChanged ()
{
super.onInventoryChanged();
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
needsUpdate = true;
}
public ItemStack decrStackSize(int slot, int quantity)
}
public ItemStack decrStackSize (int slot, int quantity)
{
ItemStack stack = super.decrStackSize(slot, quantity);
ItemStack stack = super.decrStackSize(slot, quantity);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
return stack;
}
@Override
public LiquidStack drain (int maxDrain, boolean doDrain) //Doesn't actually drain
{
return null;
}
@Override
public LiquidStack drain (int maxDrain, boolean doDrain) //Doesn't actually drain
{
return null;
}
@Override
public int getTankPressure ()
{
return 0;
}
@Override
public int getTankPressure ()
{
return 0;
}
/* Tank Container */
/* Tank Container */
@Override
public int fill (ForgeDirection from, LiquidStack resource, boolean doFill)
{
//if (from == ForgeDirection.UP)
return fill(0, resource, doFill);
//return 0;
}
@Override
public int fill (ForgeDirection from, LiquidStack resource, boolean doFill)
{
//if (from == ForgeDirection.UP)
return fill(0, resource, doFill);
//return 0;
}
@Override
public int fill (int tankIndex, LiquidStack resource, boolean doFill)
{
return fill(resource, doFill);
}
@Override
public int fill (int tankIndex, LiquidStack resource, boolean doFill)
{
return fill(resource, doFill);
}
@Override
public LiquidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public LiquidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public LiquidStack drain (int tankIndex, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public LiquidStack drain (int tankIndex, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public ILiquidTank[] getTanks (ForgeDirection direction)
{
return new ILiquidTank[] { this };
}
@Override
public ILiquidTank[] getTanks (ForgeDirection direction)
{
return new ILiquidTank[] { this };
}
@Override
public ILiquidTank getTank (ForgeDirection direction, LiquidStack type)
{
return this;
}
public int getLiquidAmount()
{
return liquid.amount - renderOffset;
}
@Override
public ILiquidTank getTank (ForgeDirection direction, LiquidStack type)
{
return this;
}
/* Updating */
@Override
public void updateEntity ()
{
if (castingDelay > 0)
{
castingDelay--;
if (castingDelay == 0)
castLiquid();
}
if (renderOffset > 0)
{
renderOffset -= 6;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
public int getLiquidAmount ()
{
return liquid.amount - renderOffset;
}
/* Updating */
@Override
public void updateEntity ()
{
if (castingDelay > 0)
{
castingDelay--;
if (castingDelay == 0)
castLiquid();
}
if (renderOffset > 0)
{
renderOffset -= 6;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
tick++;
if (tick % 20 == 0)
@ -237,94 +236,90 @@ public class CastingBasinLogic extends InventoryLogic
if (needsUpdate)
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
}
public void castLiquid ()
{
CastingRecipe recipe = LiquidBlockCasting.instance.getCastingRecipe(liquid, inventory[0]);
if (recipe != null)
{
inventory[1] = recipe.getResult();
if (recipe.consumeCast)
inventory[0] = null;
liquid = null;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
public void castLiquid ()
{
CastingRecipe recipe = LiquidBlockCasting.instance.getCastingRecipe(liquid, inventory[0]);
if (recipe != null)
{
inventory[1] = recipe.getResult();
if (recipe.consumeCast)
inventory[0] = null;
liquid = null;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
/* NBT */
@Override
public void readFromNBT (NBTTagCompound tags)
{
super.readFromNBT(tags);
readCustomNBT(tags);
}
public void readCustomNBT (NBTTagCompound tags)
{
if (tags.getBoolean("hasLiquid"))
this.liquid = new LiquidStack(tags.getInteger("itemID"), tags.getInteger("amount"), tags.getInteger("itemMeta"));
else
this.liquid = null;
}
@Override
public void writeToNBT (NBTTagCompound tags)
{
super.writeToNBT(tags);
writeCustomNBT(tags);
}
public void writeCustomNBT (NBTTagCompound tags)
{
tags.setBoolean("hasLiquid", liquid != null);
if (liquid != null)
{
tags.setInteger("itemID", liquid.itemID);
tags.setInteger("amount", liquid.amount);
tags.setInteger("itemMeta", liquid.itemMeta);
}
}
/* Packets */
@Override
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeToNBT(tag);
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readFromNBT(packet.customParam1);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
/* NBT */
@Override
public int[] getSizeInventorySide (int var1)
public void readFromNBT (NBTTagCompound tags)
{
return new int[] {1, 1, 1, 1, 1, 1, 1};
super.readFromNBT(tags);
readCustomNBT(tags);
}
public void readCustomNBT (NBTTagCompound tags)
{
if (tags.getBoolean("hasLiquid"))
this.liquid = new LiquidStack(tags.getInteger("itemID"), tags.getInteger("amount"), tags.getInteger("itemMeta"));
else
this.liquid = null;
}
@Override
public boolean func_102007_a (int i, ItemStack itemstack, int j)
public void writeToNBT (NBTTagCompound tags)
{
if (j == 0)
return false;
else
return true;
super.writeToNBT(tags);
writeCustomNBT(tags);
}
public void writeCustomNBT (NBTTagCompound tags)
{
tags.setBoolean("hasLiquid", liquid != null);
if (liquid != null)
{
tags.setInteger("itemID", liquid.itemID);
tags.setInteger("amount", liquid.amount);
tags.setInteger("itemMeta", liquid.itemMeta);
}
}
/* Packets */
@Override
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeToNBT(tag);
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public boolean func_102008_b (int i, ItemStack itemstack, int j)
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
/*if (j == 0)
return false;
readFromNBT(packet.customParam1);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
@Override
public int[] getSizeInventorySide (int side) //getValidSlotsForSide
{
if (side == 0)
return new int[] { 1 };
else
return true;*/
return new int[] { 0 };
}
@Override
public boolean func_102007_a (int slot, ItemStack itemstack, int side)
{
return true;
}
@Override
public boolean func_102008_b (int slot, ItemStack itemstack, int side)
{
return true;
}

View File

@ -19,216 +19,215 @@ import net.minecraftforge.liquids.ILiquidTank;
import net.minecraftforge.liquids.ITankContainer;
import net.minecraftforge.liquids.LiquidStack;
public class CastingTableLogic extends InventoryLogic
implements ILiquidTank, ITankContainer, ISidedInventory
public class CastingTableLogic extends InventoryLogic implements ILiquidTank, ITankContainer, ISidedInventory
{
public LiquidStack liquid;
int castingDelay = 0;
int renderOffset = 0;
boolean needsUpdate;
int tick;
public LiquidStack liquid;
int castingDelay = 0;
int renderOffset = 0;
boolean needsUpdate;
int tick;
public CastingTableLogic()
{
super(2);
}
@Override
public CastingTableLogic()
{
super(2);
}
@Override
public int getInventoryStackLimit ()
{
return 1;
}
@Override
public String getInvName () //Not a gui block
{
return null;
}
@Override
public String getInvName () //Not a gui block
{
return null;
}
@Override
protected String getDefaultName () //Still not a gui block
{
return null;
}
@Override
protected String getDefaultName () //Still not a gui block
{
return null;
}
@Override
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) //Definitely not a gui block
{
return null;
}
@Override
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) //Definitely not a gui block
{
return null;
}
/* Tank */
@Override
public LiquidStack getLiquid ()
{
return liquid;
}
/* Tank */
@Override
public LiquidStack getLiquid ()
{
return liquid;
}
@Override
public int getCapacity ()
{
int ret = TConstruct.ingotLiquidValue;
ItemStack inv = inventory[0];
if (inv != null && inv.getItem() instanceof IPattern)
ret *= ((IPattern) inv.getItem()).getPatternCost(inv.getItemDamage()) * 0.5;
else
ret = LiquidCasting.instance.getCastingAmount(liquid, inv);
return ret;
}
@Override
public int getCapacity ()
{
int ret = TConstruct.ingotLiquidValue;
@Override
public int fill (LiquidStack resource, boolean doFill)
{
if (doFill)
needsUpdate = true;
if (resource == null)
return 0;
ItemStack inv = inventory[0];
if (liquid == null)
{
if (inventory[1] == null && LiquidCasting.instance.getCastingRecipe(resource, inventory[0]) != null)
{
liquid = resource.copy();
int capacity = getCapacity();
if (liquid.amount > capacity)
{
liquid.amount = capacity;
}
if (liquid.amount == capacity)
{
castingDelay = LiquidCasting.instance.getCastingDelay(liquid, inventory[0]);
}
renderOffset = liquid.amount;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
return liquid.amount;
}
else
return 0;
}
else if (resource.itemID != liquid.itemID || resource.itemMeta != liquid.itemMeta)
{
return 0;
}
else if (resource.amount + liquid.amount >= getCapacity()) //Start timer here
{
int total = getCapacity();
int cap = total - liquid.amount;
if (doFill && cap != total)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
liquid.amount = getCapacity();
if (castingDelay <= 0)
{
castingDelay = LiquidCasting.instance.getCastingDelay(liquid, inventory[0]);
}
}
renderOffset = cap;
return cap;
}
else
{
if (doFill)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
liquid.amount += resource.amount;
}
return resource.amount;
}
}
@Override
public void onInventoryChanged()
{
super.onInventoryChanged();
if (inv != null && inv.getItem() instanceof IPattern)
ret *= ((IPattern) inv.getItem()).getPatternCost(inv.getItemDamage()) * 0.5;
else
ret = LiquidCasting.instance.getCastingAmount(liquid, inv);
return ret;
}
@Override
public int fill (LiquidStack resource, boolean doFill)
{
if (doFill)
needsUpdate = true;
if (resource == null)
return 0;
if (liquid == null)
{
if (inventory[1] == null && LiquidCasting.instance.getCastingRecipe(resource, inventory[0]) != null)
{
liquid = resource.copy();
int capacity = getCapacity();
if (liquid.amount > capacity)
{
liquid.amount = capacity;
}
if (liquid.amount == capacity)
{
castingDelay = LiquidCasting.instance.getCastingDelay(liquid, inventory[0]);
}
renderOffset = liquid.amount;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
return liquid.amount;
}
else
return 0;
}
else if (resource.itemID != liquid.itemID || resource.itemMeta != liquid.itemMeta)
{
return 0;
}
else if (resource.amount + liquid.amount >= getCapacity()) //Start timer here
{
int total = getCapacity();
int cap = total - liquid.amount;
if (doFill && cap != total)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
liquid.amount = getCapacity();
if (castingDelay <= 0)
{
castingDelay = LiquidCasting.instance.getCastingDelay(liquid, inventory[0]);
}
}
renderOffset = cap;
return cap;
}
else
{
if (doFill)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
liquid.amount += resource.amount;
}
return resource.amount;
}
}
@Override
public void onInventoryChanged ()
{
super.onInventoryChanged();
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
needsUpdate = true;
}
public ItemStack decrStackSize(int slot, int quantity)
}
public ItemStack decrStackSize (int slot, int quantity)
{
ItemStack stack = super.decrStackSize(slot, quantity);
ItemStack stack = super.decrStackSize(slot, quantity);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
return stack;
}
@Override
public LiquidStack drain (int maxDrain, boolean doDrain) //Doesn't actually drain
{
return null;
}
@Override
public LiquidStack drain (int maxDrain, boolean doDrain) //Doesn't actually drain
{
return null;
}
@Override
public int getTankPressure ()
{
return 0;
}
@Override
public int getTankPressure ()
{
return 0;
}
/* Tank Container */
/* Tank Container */
@Override
public int fill (ForgeDirection from, LiquidStack resource, boolean doFill)
{
//if (from == ForgeDirection.UP)
return fill(0, resource, doFill);
//return 0;
}
@Override
public int fill (ForgeDirection from, LiquidStack resource, boolean doFill)
{
//if (from == ForgeDirection.UP)
return fill(0, resource, doFill);
//return 0;
}
@Override
public int fill (int tankIndex, LiquidStack resource, boolean doFill)
{
return fill(resource, doFill);
}
@Override
public int fill (int tankIndex, LiquidStack resource, boolean doFill)
{
return fill(resource, doFill);
}
@Override
public LiquidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public LiquidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public LiquidStack drain (int tankIndex, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public LiquidStack drain (int tankIndex, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public ILiquidTank[] getTanks (ForgeDirection direction)
{
return new ILiquidTank[] { this };
}
@Override
public ILiquidTank[] getTanks (ForgeDirection direction)
{
return new ILiquidTank[] { this };
}
@Override
public ILiquidTank getTank (ForgeDirection direction, LiquidStack type)
{
return this;
}
public int getLiquidAmount()
{
return liquid.amount - renderOffset;
}
@Override
public ILiquidTank getTank (ForgeDirection direction, LiquidStack type)
{
return this;
}
/* Updating */
@Override
public void updateEntity ()
{
if (castingDelay > 0)
{
castingDelay--;
if (castingDelay == 0)
castLiquid();
}
if (renderOffset > 0)
{
renderOffset -= 6;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
public int getLiquidAmount ()
{
return liquid.amount - renderOffset;
}
/* Updating */
@Override
public void updateEntity ()
{
if (castingDelay > 0)
{
castingDelay--;
if (castingDelay == 0)
castLiquid();
}
if (renderOffset > 0)
{
renderOffset -= 6;
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
tick++;
if (tick % 20 == 0)
@ -237,94 +236,90 @@ public class CastingTableLogic extends InventoryLogic
if (needsUpdate)
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
}
public void castLiquid ()
{
CastingRecipe recipe = LiquidCasting.instance.getCastingRecipe(liquid, inventory[0]);
if (recipe != null)
{
inventory[1] = recipe.getResult();
if (recipe.consumeCast)
inventory[0] = null;
liquid = null;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
public void castLiquid ()
{
CastingRecipe recipe = LiquidCasting.instance.getCastingRecipe(liquid, inventory[0]);
if (recipe != null)
{
inventory[1] = recipe.getResult();
if (recipe.consumeCast)
inventory[0] = null;
liquid = null;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
/* NBT */
@Override
public void readFromNBT (NBTTagCompound tags)
{
super.readFromNBT(tags);
readCustomNBT(tags);
}
public void readCustomNBT (NBTTagCompound tags)
{
if (tags.getBoolean("hasLiquid"))
this.liquid = new LiquidStack(tags.getInteger("itemID"), tags.getInteger("amount"), tags.getInteger("itemMeta"));
else
this.liquid = null;
}
@Override
public void writeToNBT (NBTTagCompound tags)
{
super.writeToNBT(tags);
writeCustomNBT(tags);
}
public void writeCustomNBT (NBTTagCompound tags)
{
tags.setBoolean("hasLiquid", liquid != null);
if (liquid != null)
{
tags.setInteger("itemID", liquid.itemID);
tags.setInteger("amount", liquid.amount);
tags.setInteger("itemMeta", liquid.itemMeta);
}
}
/* Packets */
@Override
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeToNBT(tag);
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readFromNBT(packet.customParam1);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
/* NBT */
@Override
public int[] getSizeInventorySide (int var1)
public void readFromNBT (NBTTagCompound tags)
{
return new int[] {1, 1, 1, 1, 1, 1, 1};
super.readFromNBT(tags);
readCustomNBT(tags);
}
public void readCustomNBT (NBTTagCompound tags)
{
if (tags.getBoolean("hasLiquid"))
this.liquid = new LiquidStack(tags.getInteger("itemID"), tags.getInteger("amount"), tags.getInteger("itemMeta"));
else
this.liquid = null;
}
@Override
public void writeToNBT (NBTTagCompound tags)
{
super.writeToNBT(tags);
writeCustomNBT(tags);
}
public void writeCustomNBT (NBTTagCompound tags)
{
tags.setBoolean("hasLiquid", liquid != null);
if (liquid != null)
{
tags.setInteger("itemID", liquid.itemID);
tags.setInteger("amount", liquid.amount);
tags.setInteger("itemMeta", liquid.itemMeta);
}
}
/* Packets */
@Override
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeToNBT(tag);
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readFromNBT(packet.customParam1);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
@Override
public int[] getSizeInventorySide (int side)
{
if (side == 0)
return new int[] { 1 };
else
return new int[] { 0 };
}
@Override
public boolean func_102007_a (int i, ItemStack itemstack, int j)
{
if (j == 0)
return false;
else
return true;
return true;
}
@Override
public boolean func_102008_b (int i, ItemStack itemstack, int j)
{
/*if (j == 0)
return false;
else
return true;*/
return true;
}

View File

@ -333,7 +333,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
return false;
currentLiquid += liquid.amount;
System.out.println("Current liquid: "+currentLiquid);
//System.out.println("Current liquid: "+currentLiquid);
boolean added = false;
for (int i = 0; i < moltenMetal.size(); i++)
{

View File

@ -1,5 +1,8 @@
package mods.tinker.tconstruct.modifiers;
import java.util.Arrays;
import java.util.List;
import mods.tinker.common.ToolMod;
import mods.tinker.tconstruct.library.ToolCore;
import net.minecraft.item.ItemStack;
@ -48,7 +51,7 @@ public class ModAttack extends ToolMod
{
int amount = 24;
ToolCore toolItem = (ToolCore) tool.getItem();
if (toolItem.pierceArmor() || toolItem.rangedTool())
if (toolItem.pierceArmor() || !validType(toolItem))
amount = 36;
int[] keyPair = tags.getIntArray(key);
@ -103,4 +106,10 @@ public class ModAttack extends ToolMod
String modName = "\u00a7f"+guiType+" ("+keys[0]+"/"+keys[1]+")";
tags.setString(tip, modName);
}
public boolean validType(ToolCore tool)
{
List list = Arrays.asList(tool.toolCategories());
return list.contains("throwing");
}
}

View File

@ -1,6 +1,10 @@
package mods.tinker.tconstruct.modifiers;
import java.util.Arrays;
import java.util.List;
import mods.tinker.common.ToolMod;
import mods.tinker.tconstruct.library.ToolCore;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -21,7 +25,10 @@ public class ModBlaze extends ToolMod
@Override
protected boolean canModify (ItemStack tool, ItemStack[] input)
{
ToolCore toolItem = (ToolCore) tool.getItem();
if (!validType(toolItem))
return false;
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
if (!tags.hasKey(key))
return tags.getInteger("Modifiers") > 0;
@ -86,4 +93,10 @@ public class ModBlaze extends ToolMod
String modName = "\u00a76Blaze ("+keys[0]+"/"+keys[1]+")";
tags.setString(tip, modName);
}
public boolean validType(ToolCore tool)
{
List list = Arrays.asList(tool.toolCategories());
return list.contains("melee") || list.contains("ammo");
}
}

View File

@ -1,6 +1,6 @@
package mods.tinker.tconstruct.modifiers;
import ic2.api.IElectricItem;
import ic2.api.item.IElectricItem;
import java.util.ArrayList;

View File

@ -1,9 +1,12 @@
package mods.tinker.tconstruct.modifiers;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import mods.tinker.common.ToolMod;
import mods.tinker.tconstruct.library.ToolCore;
import mods.tinker.tconstruct.library.Weapon;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
@ -27,6 +30,10 @@ public class ModLapis extends ToolMod
@Override
protected boolean canModify (ItemStack tool, ItemStack[] input)
{
ToolCore toolItem = (ToolCore) tool.getItem();
if (!validType(toolItem))
return false;
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
if (!tags.hasKey(key))
return tags.getInteger("Modifiers") > 0;
@ -186,4 +193,10 @@ public class ModLapis extends ToolMod
String modName = "\u00a79Lapis (" + keys[0] + "/" + max + ")";
tags.setString(tip, modName);
}
public boolean validType(ToolCore tool)
{
List list = Arrays.asList(tool.toolCategories());
return list.contains("weapon") || list.contains("harvest");
}
}

View File

@ -1,6 +1,10 @@
package mods.tinker.tconstruct.modifiers;
import java.util.Arrays;
import java.util.List;
import mods.tinker.common.ToolMod;
import mods.tinker.tconstruct.library.ToolCore;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -21,6 +25,9 @@ public class ModRedstone extends ToolMod
@Override
protected boolean canModify (ItemStack tool, ItemStack[] input)
{
ToolCore toolItem = (ToolCore) tool.getItem();
if (!validType(toolItem))
return false;
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
if (!tags.hasKey(key))
@ -92,4 +99,10 @@ public class ModRedstone extends ToolMod
String modName = "\u00a74Redstone ("+keys[0]+"/"+keys[1]+")";
tags.setString(tip, modName);
}
public boolean validType(ToolCore tool)
{
List list = Arrays.asList(tool.toolCategories());
return list.contains("harvest");
}
}

View File

@ -0,0 +1,90 @@
package mods.tinker.tconstruct.tools;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import mods.tinker.tconstruct.TContent;
import mods.tinker.tconstruct.library.ToolCore;
import net.minecraft.item.Item;
public class Chisel extends ToolCore
{
public Chisel(int id)
{
super(id, 0);
}
@Override
public int getHeadType ()
{
return 1;
}
@SideOnly(Side.CLIENT)
@Override
public int getRenderPasses (int metadata)
{
return 8;
}
@Override
public int getPartAmount()
{
return 2;
}
@Override
public void registerPartPaths (int index, String[] location)
{
headStrings.put(index, location[0]);
brokenHeadStrings.put(index, location[1]);
handleStrings.put(index, location[2]);
}
@Override
public String getIconSuffix (int partType)
{
switch (partType)
{
case 0:
return "_chisel_head";
case 1:
return "_chisel_head_broken";
case 2:
return "_chisel_handle";
default:
return "";
}
}
@Override
public String getEffectSuffix ()
{
return "_chisel_effect";
}
@Override
public String getDefaultFolder ()
{
return "chisel";
}
@Override
protected Item getHeadItem ()
{
return TContent.chiselHead;
}
@Override
protected Item getAccessoryItem ()
{
// TODO Auto-generated method stub
return null;
}
@Override
public String[] toolCategories ()
{
return new String[] { "utility" };
}
}

View File

@ -36,6 +36,12 @@ public class Dagger extends Weapon
return itemstack;
}
@Override
public String[] toolCategories()
{
return new String[] { "weapon", "melee", "throwing" };
}
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.bow;

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Some files were not shown because too many files have changed in this diff Show More