Пример #1
0
        public void ChangeGameState(MinecraftClient client, IPacket packet) {
            var GamePacket = (CBChangeGameState)packet;
            string eventName = "";

            switch (GamePacket.Reason) {
                case 0:
                    eventName = "Invalid bed";
                    break;
                case 1:
                    eventName = "Rain Start";
                    break;
                case 2:
                    eventName = "Rain End";
                    break;
                case 3:
                    eventName = "Game Mode";
                    break;
                case 4:
                    eventName = "Credits";
                    break;
                case 5:
                    eventName = "Demo";
                    break;
                case 6:
                    eventName = "Bow Hit";
                    break;
                case 7:
                    eventName = "Fade value";
                    break;
                case 8:
                    eventName = "Fade time";
                    break;
            }

            client.RaiseGameStateChanged(eventName, GamePacket.Value);
        }