package projectzombie.entity.tileentity;

import bdf.types.BdfNamedList;
import bdf.types.BdfObject;
import projectzombie.util.ItemStack;

public class TileEntityClayPot extends TileEntity
{
	private double volume;
	
	public TileEntityClayPot(double volume) {
		this.volume = volume;
	}
	
	public TileEntityClayPot(BdfObject bdf) {
		BdfClassLoad(bdf);
	}
	
	public double getVolume() {
		return volume;
	}
	
	public void setVolume(double volume) {
		this.volume = volume;
	}
	
	@Override
	public void BdfClassLoad(BdfObject bdf) {
		super.BdfClassLoad(bdf);
		
		BdfNamedList nl = bdf.getNamedList();
		volume = nl.get("volume").getDouble();
	}
	
	@Override
	public void BdfClassSave(BdfObject bdf) {
		super.BdfClassSave(bdf);
		
		BdfNamedList nl = bdf.getNamedList();
		nl.set("volume", bdf.newObject().setDouble(volume));
	}
}
