mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 05:44:27 +00:00
Fix inventory.container
This commit is contained in:
1 parent
e3adf83605
commit
9b2dbcbe3e
4 files changed
+12
-10
No files matched your search
@@ -35,7 +35,7 @@ public class ContainerElectricChest extends Container
|
||||
tileEntity.openInventory();
|
||||
}
|
||||
else {
|
||||
itemInventory.openInventory();
|
||||
itemInventory.openInventory(inventory.player);
|
||||
}
|
||||
|
||||
for(int slotY = 0; slotY < 6; slotY++)
|
||||
@@ -86,7 +86,7 @@ public class ContainerElectricChest extends Container
|
||||
tileEntity.closeInventory();
|
||||
}
|
||||
else {
|
||||
itemInventory.closeInventory();
|
||||
itemInventory.closeInventory(entityplayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ContainerElectricChest extends Container
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotID)
|
||||
{
|
||||
ItemStack stack = null;
|
||||
Slot currentSlot = (Slot)inventorySlots.get(slotID);
|
||||
Slot currentSlot = inventorySlots.get(slotID);
|
||||
|
||||
if(currentSlot != null && currentSlot.getHasStack())
|
||||
{
|
||||
@@ -121,7 +121,7 @@ public class ContainerElectricChest extends Container
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(slotID == 54)
|
||||
else
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 55, inventorySlots.size(), true))
|
||||
{
|
||||
|
||||
@@ -3,13 +3,14 @@ package mekanism.common.inventory.container;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ContainerWorkbench;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ContainerRobitCrafting extends ContainerWorkbench
|
||||
{
|
||||
public ContainerRobitCrafting(InventoryPlayer inventory, World world)
|
||||
{
|
||||
super(inventory, world, 0, 0, 0);
|
||||
super(inventory, world, BlockPos.ORIGIN);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,13 +3,14 @@ package mekanism.common.inventory.container;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ContainerRepair;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ContainerRobitRepair extends ContainerRepair
|
||||
{
|
||||
public ContainerRobitRepair(InventoryPlayer inventory, World world)
|
||||
{
|
||||
super(inventory, world, 0, 0, 0, inventory.player);
|
||||
super(inventory, world, BlockPos.ORIGIN, inventory.player);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.inventory.SlotFurnace;
|
||||
import net.minecraft.inventory.SlotFurnaceOutput;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
@@ -27,7 +27,7 @@ public class ContainerRobitSmelting extends Container
|
||||
|
||||
addSlotToContainer(new Slot(entity, 28, 56, 17));
|
||||
addSlotToContainer(new Slot(entity, 29, 56, 53));
|
||||
addSlotToContainer(new SlotFurnace(inventory.player, entity, 30, 116, 35));
|
||||
addSlotToContainer(new SlotFurnaceOutput(inventory.player, entity, 30, 116, 35)); //TODO: ?
|
||||
|
||||
int slotY;
|
||||
|
||||
@@ -129,7 +129,7 @@ public class ContainerRobitSmelting extends Container
|
||||
}
|
||||
else if(slotID != 1 && slotID != 0)
|
||||
{
|
||||
if(FurnaceRecipes.smelting().getSmeltingResult(slotStack) != null)
|
||||
if(FurnaceRecipes.instance().getSmeltingResult(slotStack) != null)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
@@ -162,7 +162,7 @@ public class ContainerRobitSmelting extends Container
|
||||
|
||||
if(slotStack.stackSize == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(null);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
|
||||
Reference in new issue
Block a user