Exemple #1
0
 public void SetAllTo(BlockPrototype prototype)
 {
     foreach (var position in AllPositions())
     {
         world.SetBlockPrototype(position, prototype);
     }
 }
Exemple #2
0
 public Block(BlockPrototype prototype, BlockPosition position, byte lightLevel)
 {
     Position = position;
     LightLevel = lightLevel;
     Prototype = prototype;
 }
 public byte this[BlockPrototype blockPrototype]
 {
     get { return blockIndexes[blockPrototype]; }
 }
Exemple #4
0
        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;
            }
        }