tongs are functional but rendering is jacked
This commit is contained in:
@@ -99,7 +99,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
|
||||
if (tile != null) {
|
||||
if (hand.equals(player.getActiveHand())) {
|
||||
|
||||
ItemStack pItem = player.inventory.getCurrentItem().copy();
|
||||
ItemStack pItem = player.inventory.getCurrentItem();
|
||||
ItemStack fuelItem = tile.getSlotStack(0);
|
||||
|
||||
/***********************
|
||||
@@ -160,9 +160,9 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (facing == EnumFacing.UP) {
|
||||
doForgeInventoryManager(pItem, world, tile, pos, hitX, hitY, hitZ, state, player);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ public interface AnvilHandler {
|
||||
|
||||
static boolean doWork(ItemStack pItem, Integer counter, TileAnvil tile, World world, BlockPos pos, EntityPlayer player) {
|
||||
|
||||
if (!world.isRemote) {
|
||||
|
||||
if (pItem.getItem().equals(ModItems.slottedtongs)) {
|
||||
|
||||
IItemHandler inventory = pItem.getCapability(ITEM_HANDLER, null);
|
||||
@@ -357,7 +357,7 @@ public interface AnvilHandler {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,22 +111,23 @@ public interface ForgeHandler {
|
||||
}
|
||||
|
||||
static boolean doWork(ItemStack pItem, Integer counter, TileForge tile, World world, BlockPos pos, EntityPlayer player) {
|
||||
|
||||
if (pItem.getItem().equals(ModItems.slottedtongs)) {
|
||||
IItemHandler inventory = (IItemHandlerModifiable) pItem.getCapability(ITEM_HANDLER, null);
|
||||
IItemHandler inventory = pItem.getCapability(ITEM_HANDLER, null);
|
||||
ItemStack tongsStack = inventory.getStackInSlot(0).copy();
|
||||
|
||||
if (tongsStack.isEmpty()) {
|
||||
if (!tile.getSlotStack(counter).isEmpty()) {
|
||||
ItemStack tempStack = tile.getSlotStack(counter).copy();
|
||||
tile.setSlotStack(counter, ItemStack.EMPTY);
|
||||
inventory.insertItem(0, tempStack, false);
|
||||
tile.setSlotStack(counter, ItemStack.EMPTY);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!tongsStack.isEmpty()) {
|
||||
if (tile.getSlotStack(counter).isEmpty()) {
|
||||
ItemStack tempStack = tongsStack;
|
||||
ItemStack tempStack = tongsStack.copy();
|
||||
tile.setSlotStack(counter, tempStack);
|
||||
inventory.extractItem(0, 1, false);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user