Exemplo n.º 1
0
 public void RemoveBlockEntity(BlockEntity blockEntity)
 {
     if (this.BlockEntities.ContainsKey(blockEntity.ToBlockCoordinate3D()))
     {
         this.BlockEntities.Remove(blockEntity.ToBlockCoordinate3D());
     }
 }
Exemplo n.º 2
0
        public void AddBlockEntity(BlockEntity blockEntity)
        {
            if (this.BlockEntities.ContainsKey(blockEntity.ToBlockCoordinate3D()))
            {
                return;
            }

            this.BlockEntities.Add(blockEntity.ToBlockCoordinate3D(), blockEntity);
        }
Exemplo n.º 3
0
        public void AddBlockEntity(BlockEntity blockEntity)
        {
            if (this._blockEntities.ContainsKey(blockEntity.ToBlockCoordinate3D()) ||
                blockEntity.World.Name != this.Name)
            {
                return;
            }

            this._blockEntities.Add(blockEntity.ToBlockCoordinate3D(), blockEntity);
            blockEntity.Chunk.AddBlockEntity(blockEntity);
        }
Exemplo n.º 4
0
        public void RemoveBlockEntity(BlockEntity blockEntity)
        {
            BlockCoordinate3D pos = blockEntity.ToBlockCoordinate3D();

            if (!this._blockEntities.ContainsKey(pos))
            {
                return;
            }

            blockEntity.Chunk.RemoveBlockEntity(blockEntity);
            this._blockEntities.Remove(pos);
        }