@Override
	public void writeToNBT(NBTTagCompound nbt)
	{
		super.writeToNBT(nbt);
		
		if(this.input != null)
			nbt.setInteger("INPUT", this.input.ordinal());
		
		if(this.output != null)
			nbt.setInteger("OUTPUT", this.output.ordinal());
		
		if(this.upgradeSide != null)
			nbt.setInteger("UPGRADESIDE", this.upgradeSide.ordinal());
	
		if(this.upgrade != null)
			nbt.setInteger("UPGRADE", Item.getIdFromItem(upgrade));
		
		if(this.color != null)
			nbt.setInteger("COLOR", this.color.getRGB());
		
		nbt.setInteger("META", this.meta);
		nbt.setInteger("PROGRAMMER", this.programmerMode);
	}