public void SetAllTo(BlockPrototype prototype) { foreach (var position in AllPositions()) { world.SetBlockPrototype(position, prototype); } }
public Block(BlockPrototype prototype, BlockPosition position, byte lightLevel) { Position = position; LightLevel = lightLevel; Prototype = prototype; }
public byte this[BlockPrototype blockPrototype] { get { return blockIndexes[blockPrototype]; } }
public void SetBlockPrototype(RelativeBlockPosition position, BlockPrototype prototype) { blockArray[position.X, position.Y, position.Z] = prototype; if (prototype.CanBeSeen && position.Y > highestVisibleBlock) { highestVisibleBlock = position.Y; } if (!prototype.CanBeSeen && position.Y < lowestInvisibleBlock) { lowestInvisibleBlock = position.Y; } }