protected Chunk(ChunkIDs chunkId, DataTypes dataType, T chunkValue) { ChunkID = chunkId; DataType = dataType; if (chunkValue != null) { SetValue(chunkValue); } }
protected Chunk(ChunkIDs chunkId, DataTypes dataType, byte[] chunkDataBytes) { ChunkID = chunkId; DataType = dataType; if (chunkDataBytes != null) { SetChunkData(chunkDataBytes); } }
public BlockIDChunk(ChunkIDs chunkId, byte[] chunkDataBytes) : base(chunkId, DataTypes.BlockID, chunkDataBytes) { }
public StringChunk(ChunkIDs chunkId, byte[] chunkDataBytes) : base(chunkId, DataTypes.String, chunkDataBytes) { }
public Float32Chunk(ChunkIDs chunkId) : base(chunkId, DataTypes.Float32, (float)default) { }
public Float32Chunk(ChunkIDs chunkId, float chunkValue) : base(chunkId, DataTypes.Float32, chunkValue) { }
public Float32Chunk(ChunkIDs chunkId, byte[] chunkDataBytes) : base(chunkId, DataTypes.Float32, chunkDataBytes) { }
public UInt8ArrayChunk(ChunkIDs chunkId, byte[] chunkDataBytes) : base(chunkId, DataTypes.UInt8Array, chunkDataBytes) { }
internal void RemoveChunk(ChunkIDs chunkId) { _chunks.Remove(_chunks.First(c => c.ChunkID == chunkId)); }
public UInt32Chunk(ChunkIDs chunkId, byte[] chunkDataBytes) : base(chunkId, DataTypes.UInt32, chunkDataBytes) { }
public IChunk this[BlockIDs blockId, ChunkIDs chunkId] { get => GetChunk <IChunk>(blockId, chunkId);