Skip to content

Commit

Permalink
Remove tool crafting code that doesn't work and shouldn't exist from …
Browse files Browse the repository at this point in the history
…tinker table. Also fixes crashes with ITT repair in tinker tables.
  • Loading branch information
bonii-xx committed Oct 22, 2014
1 parent b3632e6 commit 2a2cf76
Showing 1 changed file with 0 additions and 20 deletions.
Expand Up @@ -233,25 +233,6 @@ else if (!this.mergeItemStack(itemstack1, 10, 46, false))
return itemstack;
}

protected void craftTool (ItemStack stack)
{
if (stack.getItem() instanceof IModifyable)
{
NBTTagCompound tags = stack.getTagCompound().getCompoundTag(((IModifyable) stack.getItem()).getBaseTagName());
Boolean full = (logic.getStackInSlot(2) != null || logic.getStackInSlot(3) != null);
/*for (int i = 1; i <= 4; i++)
logic.decrStackSize(i, 1);
for (int i = 6; i <= 9; i++)
logic.decrStackSize(i, 1);*/
ItemStack compare = logic.getStackInSlot(5);
int amount = compare.getItem() instanceof IModifyable ? compare.stackSize : 1;
logic.decrStackSize(5, amount);
if (!player.worldObj.isRemote && full)
worldObj.playSoundEffect(logic.xCoord, logic.yCoord, logic.zCoord, "tinker:little_saw", 1.0F, (AbilityHelper.random.nextFloat() - AbilityHelper.random.nextFloat()) * 0.2F + 1.0F);
MinecraftForge.EVENT_BUS.post(new ToolCraftedEvent(this.logic, player, stack));
}
}

protected boolean mergeCraftedStack (ItemStack stack, int slotsStart, int slotsTotal, boolean playerInventory, EntityPlayer player)
{
boolean failedToMerge = false;
Expand Down Expand Up @@ -283,7 +264,6 @@ protected boolean mergeCraftedStack (ItemStack stack, int slotsStart, int slotsT

if (copyStack == null)
{
craftTool(stack);
otherInventorySlot.putStack(stack.copy());
otherInventorySlot.onSlotChanged();
stack.stackSize = 0;
Expand Down

0 comments on commit 2a2cf76

Please sign in to comment.