/// <summary> /// Gets the tile entity for the given coordinates. May return null. /// </summary> public NbtCompound GetTileEntity(Coordinates3D coordinates) { if (TileEntities.ContainsKey(coordinates)) { return(TileEntities[coordinates]); } return(null); }
/// <summary> /// Gets the tile entity for the given coordinates. May return null. /// </summary> public NbtCompound GetTileEntity(Coordinates3D coordinates) { LastAccessed = DateTime.Now; if (TileEntities.ContainsKey(coordinates)) { return(TileEntities[coordinates]); } return(null); }
/// <summary> /// Sets the tile entity at the given coordinates to the given value. /// </summary> public void SetTileEntity(Coordinates3D coordinates, NbtCompound value) { if (value == null && TileEntities.ContainsKey(coordinates)) { TileEntities.Remove(coordinates); } else { TileEntities[coordinates] = value; } IsModified = true; }
/// <summary> /// Sets the tile entity at the given coordinates to the given value. /// </summary> public void SetTileEntity(Coordinates3D coordinates, NbtCompound value) { if (value == null && TileEntities.ContainsKey(coordinates)) { TileEntities.Remove(coordinates); } else { TileEntities[coordinates] = value; } IsModified = true; if (ParentRegion != null) { ParentRegion.DamageChunk(Coordinates); } }