예제 #1
0
        public override void StartServerSide(ICoreServerAPI manager)
        {
            api = manager;

            noSound = new BlockSounds();

            #region Block types

            api.RegisterBlock(new Block()
            {
                Code     = new AssetLocation("mantle"),
                Textures = new Dictionary <string, CompositeTexture> {
                    { "all", new CompositeTexture(new AssetLocation("block/mantle")) },
                },
                DrawType              = EnumDrawType.Cube,
                MatterState           = EnumMatterState.Solid,
                BlockMaterial         = EnumBlockMaterial.Stone,
                Replaceable           = 0,
                Resistance            = 31337,
                Sounds                = noSound,
                CreativeInventoryTabs = new string[] { "general" }
            });

            #endregion
        }
예제 #2
0
        public override void StartServerSide(ICoreServerAPI manager)
        {
            api = manager;

            noSound = new BlockSounds();

            #region Block types
            Block block = new Block()
            {
                Code     = new AssetLocation("mantle"),
                Textures = new Dictionary <string, CompositeTexture> {
                    { "all", new CompositeTexture(new AssetLocation("block/mantle")) },
                },
                DrawType           = EnumDrawType.Cube,
                MatterState        = EnumMatterState.Solid,
                BlockMaterial      = EnumBlockMaterial.Stone,
                Replaceable        = 0,
                Resistance         = 31337,
                RequiredMiningTier = 196,
                Sounds             = new BlockSounds()
                {
                    Walk   = new AssetLocation("sounds/walk/stone"),
                    ByTool = new Dictionary <EnumTool, BlockSounds>()
                    {
                        { EnumTool.Pickaxe, new BlockSounds()
                          {
                              Hit = new AssetLocation("sounds/block/rock-hit-pickaxe"), Break = new AssetLocation("sounds/block/rock-hit-pickaxe")
                          } }
                    }
                },
                CreativeInventoryTabs = new string[] { "general" }
            };

            api.RegisterBlock(block);

            #endregion
        }