コード例 #1
0
 public readonly int CalculateLightIndex(BlockPosition position)
 => CalculateStateIndex(position) / 2;
コード例 #2
0
 public ref                          BlockState this[BlockPosition position] => ref States.Span[CalculateStateIndex(position)];
コード例 #3
0
 // DO NOT CHANGE. LARGE PARTS OF CODE AND OPTIMIZATIONS RELY ON THE X-Z-Y LAYOUT
 public readonly int CalculateStateIndex(BlockPosition position)
 => position.X + Width * (position.Z + Depth * position.Y);