Skip to content

Commit 9c28204

Browse files
committed
1.21.50
1 parent defc105 commit 9c28204

File tree

14 files changed

+3061
-2806
lines changed

14 files changed

+3061
-2806
lines changed

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ jobs:
3838
file: src/MiNET/MiNET.Console/minet.zip
3939
asset_name: MiNET.zip
4040
tag: ${{ github.ref }}
41-
release_name: MiNET-CobwebSMP 1.13.0.23 (1.21.40)
41+
release_name: MiNET-CobwebSMP 1.13.0.24 (1.21.50)
4242
body: ${{ github.event.head_commit.message }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ Here are few plugins for MiNET that you can try:
4343

4444
- [Chairs](https://github.com/CobwebSMP/Chairs)
4545
- [MiPermissionsNET](https://github.com/CupidonSauce173/MiPermissionsNET)
46+
- [SnowFall](https://github.com/laz1444/SnowFall)
4647
- [WorldEdit](https://github.com/CobwebSMP/WorldEdit)
4748

src/MiNET/MiNET.Client/ICommandExecutioner.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,18 @@ async void ExecuteBlockstates(BedrockTraceHandler caller)
115115
var tp = 0;
116116
foreach (var block in BlockstateGenerator.Schemas)
117117
{
118-
if (block.Data > 7 && (block.Id == 107 || block.Id == 183 || block.Id == 184 || block.Id == 185 || block.Id == 186 || block.Id == 187)) { continue; } //disable fence_gate with in_wall_bit. because they have same runtime id?
119118
if ((block.Id == BlockstateGenerator.customId && block.Data == BlockstateGenerator.customData && BlockstateGenerator.customMode) || BlockstateGenerator.customMode == false)
120119
{
121-
SendCommand(client, $"/setblock {x} 49 0 barrier"); //add something below or a lot of thing will fail
120+
SendCommand(client, $"/setblock {x} 199 0 barrier"); //add something below or a lot of thing will fail
122121
var posX = x;
123122
var posZ = 0;
124123

125-
if (block.Name == "minecraft:redstone_wire" && block.Data > 0) { SendCommand(client, $"/setblock {posX} 50 0 {block.Command}"); } //hack for redstone wire. BDS won't activate signal until placed again
126-
if (block.Id == 386 || block.Id == 388 || block.Id == 390 || block.Id == 391 || block.Id == 392 || block.Id == 393 || block.Id == 411 || block.Id == 415) { SendCommand(client, $"/setblock {x} 50 0 water"); } //place water for sea things
127-
if (block.Id == 131 && (block.Data == 4 || block.Data == 8)) { SendCommand(client, $"/setblock {posX} 50 -1 barrier"); } //tripwire hook will fall off without bock for support
128-
if (block.Id == 131 && (block.Data == 5 || block.Data == 9)) { SendCommand(client, $"/setblock {posX + 1} 50 0 barrier"); } //tripwire hook will fall off without bock for support
129-
if (block.Id == 131 && (block.Data == 6 || block.Data == 10)) { SendCommand(client, $"/setblock {posX} 50 1 barrier"); } //tripwire hook will fall off without bock for support
130-
if (block.Id == 131 && (block.Data == 7 || block.Data == 11)) { SendCommand(client, $"/setblock {posX - 1} 50 0 barrier"); } //tripwire hook will fall off without bock for support
124+
if (block.Name == "minecraft:redstone_wire" && block.Data > 0) { SendCommand(client, $"/setblock {posX} 200 0 {block.Command}"); } //hack for redstone wire. BDS won't activate signal until placed again
125+
if (block.Id == 386 || block.Id == 388 || block.Id == 390 || block.Id == 391 || block.Id == 392 || block.Id == 393 || block.Id == 411 || block.Id == 415) { SendCommand(client, $"/setblock {x} 200 0 water"); } //place water for sea things
126+
if (block.Id == 131 && (block.Data == 4 || block.Data == 8)) { SendCommand(client, $"/setblock {posX} 200 -1 barrier"); } //tripwire hook will fall off without bock for support
127+
if (block.Id == 131 && (block.Data == 5 || block.Data == 9)) { SendCommand(client, $"/setblock {posX + 1} 200 0 barrier"); } //tripwire hook will fall off without bock for support
128+
if (block.Id == 131 && (block.Data == 6 || block.Data == 10)) { SendCommand(client, $"/setblock {posX} 200 1 barrier"); } //tripwire hook will fall off without bock for support
129+
if (block.Id == 131 && (block.Data == 7 || block.Data == 11)) { SendCommand(client, $"/setblock {posX - 1} 200 0 barrier"); } //tripwire hook will fall off without bock for support
131130

132131
if (block.Id == 26 && (block.Data == 0 || block.Data == 4)) { posZ = posZ + 1; } //offset to get bed first update
133132
if (block.Id == 26 && (block.Data == 1 || block.Data == 5)) { posX = posX - 1; } //offset to get bed first update

src/MiNET/MiNET.Client/McpeClientMessageHandlerBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public virtual void HandleMcpeResourcePacksInfo(McpeResourcePacksInfo message)
124124

125125
foreach (ResourcePackInfo packInfo in message.texturepacks)
126126
{
127-
resourcePackIds.Add(packInfo.UUID);
127+
resourcePackIds.Add(packInfo.UUID.ToString());
128128
}
129129

130130
var response = new McpeResourcePackClientResponse();

src/MiNET/MiNET/MiNET.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
44
<PackageId>MiNET-CobwebSMP</PackageId>
5-
<Version>1.13.0.23</Version>
5+
<Version>1.13.0.24</Version>
66
<Authors>gurun</Authors>
77
<Company>Niclas Olofsson</Company>
88
<Description>MiNET - a Minecraft PocketEdition Server</Description>

src/MiNET/MiNET/Net/AuthInputFlags.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,12 @@ public enum AuthInputFlags : long
6262
IsRotControlledByMoveDirection = 1L << 55,
6363
StartSpinAttack = 1L << 56,
6464
StopSpinAttack = 1L << 57,
65-
INPUT_NUM = 1L << 58
65+
IsHotbarOnlyTouch = 1L << 58,
66+
JumpReleasedRaw = 1L << 59,
67+
JumpPressedRaw = 1L << 60,
68+
JumpCurrentRaw = 1L << 61,
69+
SneakReleasedRaw = 1L << 62,
70+
SneakPressedRaw = 1L << 63,
71+
SneakCurrentRaw = 1L << 64,
72+
INPUT_NUM = 1L << 65
6673
}

src/MiNET/MiNET/Net/MCPE Protocol.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ namespace MiNET.Net
4444
{
4545
public class McpeProtocolInfo
4646
{
47-
public const int ProtocolVersion = 748;
48-
public const string GameVersion = "1.21.40";
47+
public const int ProtocolVersion = 766;
48+
public const string GameVersion = "1.21.50";
4949
}
5050

5151
public interface IMcpeMessageHandler
@@ -2216,6 +2216,8 @@ public partial class McpeResourcePacksInfo : Packet<McpeResourcePacksInfo>
22162216
public bool mustAccept; // = null;
22172217
public bool hasAddons; // = null;
22182218
public bool hasScripts; // = null;
2219+
public UUID templateUUID; // = null;
2220+
public string templateVersion; // = null;
22192221
public TexturePackInfos texturepacks; // = null;
22202222

22212223
public McpeResourcePacksInfo()
@@ -2233,6 +2235,8 @@ protected override void EncodePacket()
22332235
Write(mustAccept);
22342236
Write(hasAddons);
22352237
Write(hasScripts);
2238+
Write(templateUUID);
2239+
Write(templateVersion);
22362240
Write(texturepacks);
22372241

22382242
AfterEncode();
@@ -2250,6 +2254,8 @@ protected override void DecodePacket()
22502254
mustAccept = ReadBool();
22512255
hasAddons = ReadBool();
22522256
hasScripts = ReadBool();
2257+
templateUUID = ReadUUID();
2258+
templateVersion = ReadString();
22532259
texturepacks = ReadTexturePackInfos();
22542260

22552261
AfterDecode();
@@ -2265,7 +2271,9 @@ protected override void ResetPacket()
22652271
mustAccept=default(bool);
22662272
hasAddons=default(bool);
22672273
hasScripts=default(bool);
2268-
texturepacks=default(TexturePackInfos);
2274+
templateUUID=default(UUID);
2275+
templateVersion=default(string);
2276+
texturepacks =default(TexturePackInfos);
22692277
}
22702278

22712279
}

src/MiNET/MiNET/Net/McpePlayerAuthInput.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ partial void AfterDecode()
4848

4949
AnalogMoveVector = ReadVector2();
5050
CameraOrientation = ReadVector3();
51+
ReadVector2(); //motion todo
5152
}
5253

5354
partial void AfterEncode()

src/MiNET/MiNET/Net/Packet.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,6 +1599,7 @@ public void Write(ItemStackResponses responses)
15991599
Write(slot.Count);
16001600
WriteSignedVarInt(slot.StackNetworkId);
16011601
Write(slot.CustomName);
1602+
Write(slot.FilteredCustomName);
16021603
WriteSignedVarInt(slot.DurabilityCorrection);
16031604
}
16041605
}
@@ -1639,6 +1640,7 @@ public ItemStackResponses ReadItemStackResponses()
16391640
slot.Count = ReadByte();
16401641
slot.StackNetworkId = ReadSignedVarInt();
16411642
slot.CustomName = ReadString();
1643+
slot.FilteredCustomName = ReadString();
16421644
slot.DurabilityCorrection = ReadSignedVarInt();
16431645

16441646
containerInfo.Slots.Add(slot);
@@ -2459,7 +2461,7 @@ public TexturePackInfos ReadTexturePackInfos()
24592461
for (int i = 0; i < count; i++)
24602462
{
24612463
var info = new TexturePackInfo();
2462-
var id = ReadString();
2464+
var id = ReadUUID();
24632465
var version = ReadString();
24642466
var size = ReadUlong();
24652467
var encryptionKey = ReadString();
@@ -2521,7 +2523,7 @@ public ResourcePackInfos ReadResourcePackInfos()
25212523
{
25222524
var info = new ResourcePackInfo();
25232525

2524-
var id = ReadString();
2526+
var id = ReadUUID();
25252527
var version = ReadString();
25262528
var size = ReadUlong();
25272529
var encryptionKey = ReadString();

src/MiNET/MiNET/Player.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ public virtual void SendResourcePacksInfo()
379379
var directory = Config.GetProperty("ResourceDirectory", "ResourcePacks");
380380
var directoryB = Config.GetProperty("BehaviorDirectory", "BehaviorPacks");
381381
packInfo.mustAccept = Config.GetProperty("ForceResourcePacks", false);
382+
packInfo.templateUUID = new UUID(Guid.Empty.ToByteArray());
382383

383384
if (Directory.Exists(directory))
384385
{
@@ -428,7 +429,7 @@ public virtual void SendResourcePacksInfo()
428429
manifestStructure obj = JsonConvert.DeserializeObject<manifestStructure>(jsonContent);
429430
packInfos.Add(new TexturePackInfo
430431
{
431-
UUID = obj.Header.Uuid,
432+
UUID = new UUID(obj.Header.Uuid),
432433
Version = $"{obj.Header.Version[0]}.{obj.Header.Version[1]}.{obj.Header.Version[2]}",
433434
Size = (ulong) File.ReadAllBytes(zipPack).Count(),
434435
ContentKey = encrypted ? File.ReadAllText($"{zipPack}.key") : "",
@@ -468,7 +469,7 @@ public virtual void SendResourcePacksInfo()
468469
manifestStructure obj = JsonConvert.DeserializeObject<manifestStructure>(jsonContent);
469470
packInfosB.Add(new ResourcePackInfo
470471
{
471-
UUID = obj.Header.Uuid,
472+
UUID = new UUID(obj.Header.Uuid),
472473
Version = $"{obj.Header.Version[0]}.{obj.Header.Version[1]}.{obj.Header.Version[2]}",
473474
Size = (ulong) File.ReadAllBytes(zipPack).Count()
474475
});
@@ -493,11 +494,11 @@ public virtual void SendResourcePackStack()
493494
var packVersionsB = new ResourcePackIdVersions();
494495
foreach (var packData in PlayerPackData)
495496
{
496-
packVersions.Add(new PackIdVersion { Id = packData.UUID, Version = packData.Version });
497+
packVersions.Add(new PackIdVersion { Id = packData.UUID.ToString(), Version = packData.Version });
497498
}
498499
foreach (var packData in PlayerPackDataB)
499500
{
500-
packVersionsB.Add(new PackIdVersion { Id = packData.UUID, Version = packData.Version });
501+
packVersionsB.Add(new PackIdVersion { Id = packData.UUID.ToString(), Version = packData.Version });
501502
}
502503
packStack.resourcepackidversions = packVersions;
503504
packStack.behaviorpackidversions = packVersionsB;

0 commit comments

Comments
 (0)