Пример #1
0
        public void OpenInventory(Player player)
        {
            BlockCoordinates coor = new BlockCoordinates(player.KnownPosition);
            Chest chest = new Chest
            {
                Coordinates = coor,
                Metadata = 0
            };
            player.Level.SetBlock(chest, true);

            // Then we create and set the sign block entity that has all the intersting data

            ChestBlockEntity chestBlockEntity = new ChestBlockEntity
            {
                Coordinates = coor
            };

            player.Level.SetBlockEntity(chestBlockEntity, false);

            player.OpenInventory(coor);
        }