示例#1
0
 public void DoTick() {
     var player = new SbPlayer();
     player.OnGround = ThisMc.ThisPlayer.OnGround;
     player.Write(ThisMc.Nh.WSock);
 }
        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 {OnGround = client.ThisPlayer.OnGround};
            playerPacket.Write(client.Nh.WSock);

            if (client.Nh.WorldTick == null)
                client.Nh.WorldTick = new MinecraftWorld.TickHandler(ref client);

        }