예제 #1
0
파일: Chunk.cs 프로젝트: suicvne/TrueCraft
 /// <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);
 }
예제 #2
0
파일: Chunk.cs 프로젝트: andy7731/TrueCraft
 /// <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);
 }
예제 #3
0
파일: Chunk.cs 프로젝트: suicvne/TrueCraft
 /// <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;
 }
예제 #4
0
 /// <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);
     }
 }