예제 #1
0
        public void HandleTimeUpdate(MinecraftClient client, IPacket packet) {
            var myPacket = (CBTimeUpdate)packet;

            if (client.MinecraftWorld == null)
                client.MinecraftWorld = new WorldClass();

            client.MinecraftWorld.worldAge = myPacket.Ageoftheworld;
            client.MinecraftWorld.currentTime = myPacket.Timeofday;

            var playerPacket = new SBPlayer();
            playerPacket.OnGround = client.ThisPlayer.onGround;
            playerPacket.Write(client.nh.wSock);

            if (client.nh.worldTick == null)
                client.nh.worldTick = new MinecraftWorld.TickHandler(ref client);

        }
예제 #2
0
 public void DoTick() {
     var Player = new SBPlayer();
     Player.OnGround = ThisMc.ThisPlayer.onGround;
     Player.Write(ThisMc.nh.wSock);
 }