Example #1
0
        protected Chunk(ChunkIDs chunkId, DataTypes dataType, T chunkValue)
        {
            ChunkID  = chunkId;
            DataType = dataType;

            if (chunkValue != null)
            {
                SetValue(chunkValue);
            }
        }
Example #2
0
        protected Chunk(ChunkIDs chunkId, DataTypes dataType, byte[] chunkDataBytes)
        {
            ChunkID  = chunkId;
            DataType = dataType;

            if (chunkDataBytes != null)
            {
                SetChunkData(chunkDataBytes);
            }
        }
Example #3
0
 public BlockIDChunk(ChunkIDs chunkId, byte[] chunkDataBytes)
     : base(chunkId, DataTypes.BlockID, chunkDataBytes)
 {
 }
Example #4
0
 public StringChunk(ChunkIDs chunkId, byte[] chunkDataBytes)
     : base(chunkId, DataTypes.String, chunkDataBytes)
 {
 }
Example #5
0
 public Float32Chunk(ChunkIDs chunkId)
     : base(chunkId, DataTypes.Float32, (float)default)
 {
 }
Example #6
0
 public Float32Chunk(ChunkIDs chunkId, float chunkValue)
     : base(chunkId, DataTypes.Float32, chunkValue)
 {
 }
Example #7
0
 public Float32Chunk(ChunkIDs chunkId, byte[] chunkDataBytes)
     : base(chunkId, DataTypes.Float32, chunkDataBytes)
 {
 }
Example #8
0
 public UInt8ArrayChunk(ChunkIDs chunkId, byte[] chunkDataBytes)
     : base(chunkId, DataTypes.UInt8Array, chunkDataBytes)
 {
 }
Example #9
0
 internal void RemoveChunk(ChunkIDs chunkId)
 {
     _chunks.Remove(_chunks.First(c => c.ChunkID == chunkId));
 }
Example #10
0
 public UInt32Chunk(ChunkIDs chunkId, byte[] chunkDataBytes)
     : base(chunkId, DataTypes.UInt32, chunkDataBytes)
 {
 }
Example #11
0
 public IChunk this[BlockIDs blockId, ChunkIDs chunkId]
 {
     get => GetChunk <IChunk>(blockId, chunkId);