mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
Fix #325 Centrifuge dupe bug
This commit is contained in:
1 parent
d385a25efa
commit
6fb07b9d40
1 file changed
+3
-2
@@ -446,13 +446,14 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
|
||||
@Override
|
||||
public int addItem(ItemStack stack, boolean doAdd, ForgeDirection from) {
|
||||
if (inventory.getStackInSlot(SLOT_RESOURCE) == null) {
|
||||
ItemStack resource = inventory.getStackInSlot(SLOT_RESOURCE);
|
||||
if (resource == null) {
|
||||
if (doAdd)
|
||||
inventory.setInventorySlotContents(SLOT_RESOURCE, stack.copy());
|
||||
return stack.stackSize;
|
||||
}
|
||||
|
||||
if (!inventory.getStackInSlot(SLOT_RESOURCE).isItemEqual(stack))
|
||||
if (!StackUtils.isIdenticalItem(resource, stack))
|
||||
return 0;
|
||||
|
||||
int space = inventory.getStackInSlot(SLOT_RESOURCE).getMaxStackSize() - inventory.getStackInSlot(SLOT_RESOURCE).stackSize;
|
||||
|
||||
Reference in new issue
Block a user