40
40
using MiNET . Utils . Nbt ;
41
41
using System . Linq ;
42
42
using System . Collections . Generic ;
43
+ using MiNET . Worlds ;
43
44
44
45
namespace MiNET . Net
45
46
{
46
47
public class McpeProtocolInfo
47
48
{
48
- public const int ProtocolVersion = 786 ;
49
- public const string GameVersion = "1.21.70 " ;
49
+ public const int ProtocolVersion = 800 ;
50
+ public const string GameVersion = "1.21.80 " ;
50
51
}
51
52
52
53
public interface IMcpeMessageHandler
@@ -79,7 +80,6 @@ public interface IMcpeMessageHandler
79
80
void HandleMcpeCraftingEvent ( McpeCraftingEvent message ) ;
80
81
void HandleMcpeAdventureSettings ( McpeAdventureSettings message ) ;
81
82
void HandleMcpeBlockEntityData ( McpeBlockEntityData message ) ;
82
- void HandleMcpePlayerInput ( McpePlayerInput message ) ;
83
83
void HandleMcpeSetPlayerGameType ( McpeSetPlayerGameType message ) ;
84
84
void HandleMcpeMapInfoRequest ( McpeMapInfoRequest message ) ;
85
85
void HandleMcpeRequestChunkRadius ( McpeRequestChunkRadius message ) ;
@@ -837,8 +837,6 @@ public static Packet Create(short messageId, ReadOnlyMemory<byte> buffer, string
837
837
return McpeAdventureSettings . CreateObject ( ) . Decode ( buffer ) ;
838
838
case 0x38 :
839
839
return McpeBlockEntityData . CreateObject ( ) . Decode ( buffer ) ;
840
- case 0x39 :
841
- return McpePlayerInput . CreateObject ( ) . Decode ( buffer ) ;
842
840
case 0x3a :
843
841
return McpeLevelChunk . CreateObject ( ) . Decode ( buffer ) ;
844
842
case 0x3b :
@@ -5241,66 +5239,6 @@ protected override void ResetPacket()
5241
5239
5242
5240
}
5243
5241
5244
- public partial class McpePlayerInput : Packet < McpePlayerInput >
5245
- {
5246
-
5247
- public float motionX ; // = null;
5248
- public float motionZ ; // = null;
5249
- public bool jumping ; // = null;
5250
- public bool sneaking ; // = null;
5251
-
5252
- public McpePlayerInput ( )
5253
- {
5254
- Id = 0x39 ;
5255
- IsMcpe = true ;
5256
- }
5257
-
5258
- protected override void EncodePacket ( )
5259
- {
5260
- base . EncodePacket ( ) ;
5261
-
5262
- BeforeEncode ( ) ;
5263
-
5264
- Write ( motionX ) ;
5265
- Write ( motionZ ) ;
5266
- Write ( jumping ) ;
5267
- Write ( sneaking ) ;
5268
-
5269
- AfterEncode ( ) ;
5270
- }
5271
-
5272
- partial void BeforeEncode ( ) ;
5273
- partial void AfterEncode ( ) ;
5274
-
5275
- protected override void DecodePacket ( )
5276
- {
5277
- base . DecodePacket ( ) ;
5278
-
5279
- BeforeDecode ( ) ;
5280
-
5281
- motionX = ReadFloat ( ) ;
5282
- motionZ = ReadFloat ( ) ;
5283
- jumping = ReadBool ( ) ;
5284
- sneaking = ReadBool ( ) ;
5285
-
5286
- AfterDecode ( ) ;
5287
- }
5288
-
5289
- partial void BeforeDecode ( ) ;
5290
- partial void AfterDecode ( ) ;
5291
-
5292
- protected override void ResetPacket ( )
5293
- {
5294
- base . ResetPacket ( ) ;
5295
-
5296
- motionX = default ( float ) ;
5297
- motionZ = default ( float ) ;
5298
- jumping = default ( bool ) ;
5299
- sneaking = default ( bool ) ;
5300
- }
5301
-
5302
- }
5303
-
5304
5242
public partial class McpeLevelChunk : Packet < McpeLevelChunk >
5305
5243
{
5306
5244
@@ -8604,7 +8542,7 @@ protected override void ResetPacket()
8604
8542
public partial class McpeBiomeDefinitionList : Packet < McpeBiomeDefinitionList >
8605
8543
{
8606
8544
8607
- public Nbt namedtag ; // = null;
8545
+ public Biome [ ] biomes ; // = null;
8608
8546
8609
8547
public McpeBiomeDefinitionList ( )
8610
8548
{
@@ -8618,7 +8556,7 @@ protected override void EncodePacket()
8618
8556
8619
8557
BeforeEncode ( ) ;
8620
8558
8621
- Write ( namedtag ) ;
8559
+ Write ( biomes ) ;
8622
8560
8623
8561
AfterEncode ( ) ;
8624
8562
}
@@ -8632,7 +8570,7 @@ protected override void DecodePacket()
8632
8570
8633
8571
BeforeDecode ( ) ;
8634
8572
8635
- namedtag = ReadNbt ( ) ;
8573
+ biomes = ReadBiomes ( ) ;
8636
8574
8637
8575
AfterDecode ( ) ;
8638
8576
}
@@ -8644,7 +8582,7 @@ protected override void ResetPacket()
8644
8582
{
8645
8583
base . ResetPacket ( ) ;
8646
8584
8647
- namedtag = default ( Nbt ) ;
8585
+ biomes = default ( Biome [ ] ) ;
8648
8586
}
8649
8587
8650
8588
}
0 commit comments