Ejemplo n.º 1
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);
        }
 public GuiDialogSkin(ICoreClientAPI capi, ClientSkinNetwork clientSkinNetwork) : base(capi)
 {
     this.clientSkinNetwork = clientSkinNetwork;
 }