public void setMeta(int x, int y, int m) { Chunk chunk = getChunkI(x, y); if (chunk == null) return; TileInstance t = chunk.getTileInstance(x, y); if (t != null) { int m0 = t.metadata; t.metadata = (byte) m; if (m0 != m) chunk.markDirty(); } }
public TileInstance getTileInstance(int x, int y) { Chunk chunk = getChunkI(x, y); return (chunk != null) ? chunk.getTileInstance(x, y) : null; }