added centrifuge recipe + moved itemUtils to its own class

This commit is contained in:
modmuss50 2015-04-12 10:15:53 +01:00
parent 91495286db
commit fcfc6ed1df
7 changed files with 129 additions and 28 deletions

View file

@ -6,6 +6,7 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import techreborn.client.SlotFake;
import techreborn.util.FluidUtils;
import techreborn.util.ItemUtils;
public abstract class TechRebornContainer extends Container {
@ -45,7 +46,7 @@ public abstract class TechRebornContainer extends Container {
for (int slotIndex = start; stackToShift.stackSize > 0 && slotIndex < end; slotIndex++) {
Slot slot = (Slot) inventorySlots.get(slotIndex);
ItemStack stackInSlot = slot.getStack();
if (stackInSlot != null && FluidUtils.isItemEqual(stackInSlot, stackToShift, true, true)) {
if (stackInSlot != null && ItemUtils.isItemEqual(stackInSlot, stackToShift, true, true)) {
int resultingStackSize = stackInSlot.stackSize + stackToShift.stackSize;
int max = Math.min(stackToShift.getMaxStackSize(), slot.getSlotStackLimit());
if (resultingStackSize <= max) {