package net.mcft.copy.betterstorage.inventory;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;

public class InventoryWrapper implements IInventory {
	
	public final IInventory base;
	
	public InventoryWrapper(IInventory base) {
		this.base = base;
	}
	
	@Override
	public String getInvName() { return base.getInvName(); }
	@Override
	public boolean isInvNameLocalized() { return base.isInvNameLocalized(); }
	
	@Override
	public int getSizeInventory() { return base.getSizeInventory(); }
	@Override
	public ItemStack getStackInSlot(int slot) { return base.getStackInSlot(slot); }
	@Override
	public ItemStack decrStackSize(int slot, int amount) { return base.decrStackSize(slot, amount); }
	@Override
	public void setInventorySlotContents(int slot, ItemStack stack) { base.setInventorySlotContents(slot, stack); }
	@Override
	public ItemStack getStackInSlotOnClosing(int slot) { return base.getStackInSlotOnClosing(slot); }
	@Override
	public int getInventoryStackLimit() { return base.getInventoryStackLimit(); }

	@Override
	public boolean isUseableByPlayer(EntityPlayer player) { return base.isUseableByPlayer(player); }
	@Override
	public boolean isStackValidForSlot(int slot, ItemStack stack) { return base.isStackValidForSlot(slot, stack); }
	
	@Override
	public void onInventoryChanged() { base.onInventoryChanged(); }
	@Override
	public void openChest() { base.openChest(); }
	@Override
	public void closeChest() { base.closeChest(); }
	
	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof InventoryWrapper)) return false;
		InventoryWrapper inv = (InventoryWrapper)obj;
		return (base.equals(inv.base));
	}
}

@@ -266,68 +266,331 @@
 %09%0A%09p
-ublic InventoryWrapper(IInventory base) %7B%0A%09%09this.base = base
+rivate boolean overwriteName = false;%0A%09private String title;%0A%09private boolean localized;%0A%09%0A%09public InventoryWrapper(IInventory base) %7B%0A%09%09this.base = base;%0A%09%7D%0A%09public InventoryWrapper(IInventory base, String title, boolean localized) %7B%0A%09%09this(base);%0A%09%09overwriteName = true;%0A%09%09this.title = title;%0A%09%09this.localized = localized
 ;%0A%09%7D
@@ -631,32 +631,57 @@
 vName() %7B return
+ (overwriteName ? title :
  base.getInvName
@@ -682,16 +682,17 @@
 nvName()
+)
 ; %7D%0A%09@Ov
@@ -735,32 +735,61 @@
 lized() %7B return
+ (overwriteName ? localized :
  base.isInvNameL
@@ -794,24 +794,25 @@
 eLocalized()
+)
 ; %7D%0A%09%0A%09@Over

Allow overwriting title in InventoryWrapper