public void SetLocation(int x, int z) { int relX = LocalX + (x - X); int relZ = LocalZ + (z - Z); ChunkRef c = _container.SetChunk(relX, relZ, GetChunk()); _container = c._container; _cx = c._cx; _cz = c._cz; }
/// <summary> /// Create a reference to a chunk stored in a chunk container. /// </summary> /// <param name="container">Chunk container</param> /// <param name="cx">Local X-coordinate of chunk within container.</param> /// <param name="cz">Local Z-coordinate of chunk within container.</param> /// <returns>ChunkRef representing a reference to a physical chunk at the specified location within the container.</returns> public static ChunkRef Create(IChunkContainer container, int cx, int cz) { if (!container.ChunkExists(cx, cz)) { return(null); } ChunkRef c = new ChunkRef(); c._container = container; c._cx = cx; c._cz = cz; return(c); }
public void SetLocation(int x, int z) { int relX = LocalX + (x - X); int relZ = LocalZ + (z - Z); ChunkRef c = _container.SetChunk(relX, relZ, GetChunk()); _container = c._container; _cx = c._cx; _cz = c._cz; }
/// <summary> /// Create a reference to a chunk stored in a chunk container. /// </summary> /// <param name="container">Chunk container</param> /// <param name="cx">Local X-coordinate of chunk within container.</param> /// <param name="cz">Local Z-coordinate of chunk within container.</param> /// <returns>ChunkRef representing a reference to a physical chunk at the specified location within the container.</returns> public static ChunkRef Create(IChunkContainer container, int cx, int cz) { if (!container.ChunkExists(cx, cz)) { return null; } ChunkRef c = new ChunkRef(); c._container = container; c._cx = cx; c._cz = cz; return c; }
public void SetLocation(int x, int z) { ChunkRef c = _container.SetChunk(x, z, GetChunk()); _container = c._container; _cx = c._cx; _cz = c._cz; }