Ejemplo n.º 1
0
        public override void StartClientSide(ICoreClientAPI api)
        {
            api.RegisterEntityRendererClass("Item", typeof(EntityItemRenderer));

            api.RegisterEntityRendererClass("BlockFalling", typeof(EntityBlockFallingRenderer));
            api.RegisterEntityRendererClass("Shape", typeof(EntityShapeRenderer));
            api.RegisterEntityRendererClass("SkinnableShape", typeof(EntitySkinnableShapeRenderer));

            //api.RegisterDialog("BlockEntityTextInput", typeof(GuiDialogBlockEntityTextInput));
            //api.RegisterDialog("BlockEntityStove", typeof(GuiDialogBlockEntityStove));
            //api.RegisterDialog("BlockEntityQuern", typeof(GuiDialogBlockEntityQuern));
        }
Ejemplo n.º 2
0
        public override void StartClientSide(ICoreClientAPI api)
        {
            this.clientSkinNetwork = new ClientSkinNetwork(api);

            api.Event.LevelFinalize += () =>
            {
                api.World.Player.Entity.WatchedAttributes.RegisterModifiedListener("race", () =>
                {
                    SetRacials(api.World.Player.Entity);
                });
                SetRacials(api.World.Player.Entity);
            };


            api.RegisterCommand("skin", "Opens skin change gui.", "", (int i, CmdArgs args) =>
            {
                GuiDialogSkin skinGui = new GuiDialogSkin(api, this.clientSkinNetwork);
                skinGui.TryOpen();
            });

            api.RegisterEntityRendererClass("CustomRenderer", typeof(EntityCharacterSkinRenderer));

            base.StartClientSide(api);
        }