Added Ae2 and Logistic pipe support to Quantum Chest

This commit is contained in:
gigabit101 2015-09-07 20:48:35 +01:00
parent e02b1518d2
commit 61120ed30b
3 changed files with 63 additions and 3 deletions

View file

@ -39,8 +39,8 @@ public class GuiQuantumChest extends GuiContainer {
I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
this.fontRendererObj.drawString("Amount", 10, 20, 16448255);
if (tile.storedItem != null)
this.fontRendererObj.drawString(tile.storedItem.stackSize + "", 10,
if (tile.storedItem != null && tile.getStackInSlot(1) !=null)
this.fontRendererObj.drawString(tile.storedItem.stackSize + tile.getStackInSlot(1).stackSize + "", 10,
30, 16448255);
}
}

View file

@ -8,6 +8,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
import techreborn.init.ModBlocks;
import techreborn.util.Inventory;
import techreborn.util.ItemUtils;
@ -15,7 +16,7 @@ import techreborn.util.ItemUtils;
import java.util.List;
public class TileQuantumChest extends TileMachineBase implements IInventory,
IWrenchable {
IWrenchable, IDeepStorageUnit {
// Slot 0 = Input
// Slot 1 = Output
@ -245,4 +246,28 @@ public class TileQuantumChest extends TileMachineBase implements IInventory,
info.add(size + " " + name);
}
@Override
public ItemStack getStoredItemType() {
return this.storedItem;
}
@Override
public void setStoredItemCount(int amount) {
this.storedItem.stackSize = 0;
this.storedItem.stackSize += (amount);
this.markDirty();
}
@Override
public void setStoredItemType(ItemStack type, int amount) {
this.storedItem = type;
this.storedItem.stackSize = amount;
this.markDirty();
}
@Override
public int getMaxStoredCount() {
return this.storage;
}
}