package projectzombie.util;

import projectzombie.init.Tiles;
import projectzombie.tiles.Tile;

public class TileState
{
	public static final TileState EMPTY = new TileState(Tiles.VOID, 0);
	
	public Tile tile;
	public byte meta;
	public double light;
	
	public TileState(Tile tile, byte meta) {
		this.tile = tile;
		this.meta = meta;
	}
	
	public TileState(Tile tile, int meta) {
		this(tile, (byte)meta);
	}
	
	public TileState withLightLevel(double level) {
		TileState ts = new TileState(tile, meta);
		ts.light = level;
		return ts;
	}
	
	public TileState withMeta(short meta) {
		return new TileState(tile, meta);
	}
	
	public TileState withMeta(int meta) {
		return this.withMeta((short)meta);
	}
}
