package client.network;

import java.util.Map;

import common.collect.Maps;
import common.entity.npc.EntityNPC;
import common.inventory.Container;
import common.inventory.InventoryBasic;
import common.inventory.InventoryPlayer;
import common.tileentity.ILockableContainer;
import common.tileentity.Passcode;

public class LocalContainer extends InventoryBasic implements ILockableContainer {
	private Map<Integer, Integer> fields = Maps.<Integer, Integer>newHashMap();

	public LocalContainer(String title, int slotCount) {
		super(title, slotCount);
	}

	public int getField(int id) {
		return this.fields.containsKey(Integer.valueOf(id)) ? ((Integer)this.fields.get(Integer.valueOf(id))).intValue() : 0;
	}

	public void setField(int id, int value) {
		this.fields.put(Integer.valueOf(id), Integer.valueOf(value));
	}

	public int getFieldCount() {
		return this.fields.size();
	}

	public boolean isLocked() {
		return false;
	}

	public void setLockCode(Passcode code) {
	}

	public Passcode getLockCode() {
		return Passcode.EMPTY_CODE;
	}

	public String getGuiID() {
		return null;
	}

	public Container createContainer(InventoryPlayer playerInventory, EntityNPC playerIn) {
		throw new UnsupportedOperationException();
	}
}
