Skip to content

Commit

Permalink
Update to 1.19.10
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyvv committed Jul 22, 2022
1 parent 6348149 commit 13404e8
Show file tree
Hide file tree
Showing 4 changed files with 26,280 additions and 13,913 deletions.
2 changes: 1 addition & 1 deletion src/Alex/Entities/BlockEntities/BeaconBlockEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected override void ReadFrom(NbtCompound compound)
}

if (compound.TryGet<NbtInt>("Secondary", out var secondary)
|| compound.TryGet<NbtInt>("secondary", out primary))
|| compound.TryGet<NbtInt>("secondary", out secondary))
{
if (secondary.Value >= 0)
{
Expand Down
23 changes: 16 additions & 7 deletions src/Alex/Net/Bedrock/BedrockClientPacketHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ public void HandleMcpeSetTime(McpeSetTime message)

Client.ChangeDimensionResetEvent.Set();
}

public void HandleMcpeStartGame(McpeStartGame message)
{
Log.Warn($"Experimental gameplay override={message.levelSettings.experimentalGameplayOverride} Experiments={message.levelSettings.experiments.Count} BaseGameVersion={message.levelSettings.gameVersion}");

if (message.levelSettings.gameVersion.Trim().StartsWith("1.17"))
if ( message.levelSettings.gameVersion.Trim().StartsWith("1.17"))
{
ChunkProcessor.WorldSettings = new WorldSettings(256, 0);
}
Expand Down Expand Up @@ -407,9 +407,10 @@ public void HandleMcpeAddPlayer(McpeAddPlayer message)
remotePlayer.HandleMetadata(message.metadata);
}

UpdateEntityAdventureFlags(
remotePlayer, message.flags, message.actionPermissions, message.commandPermission,
message.permissionLevel, message.customStoredPermissions);
//TODO: Fix adventure flags
//UpdateEntityAdventureFlags(
// remotePlayer, message.flags, message.actionPermissions, message.commandPermission,
// message.permissionLevel, message.customStoredPermissions);

Client.World.SpawnEntity(remotePlayer);

Expand Down Expand Up @@ -704,9 +705,17 @@ public void HandleMcpeAvailableEntityIdentifiers(McpeAvailableEntityIdentifiers
{
foreach (NbtCompound tag in ids.ToArray<NbtCompound>())
{
if (tag.TryGet("id", out NbtString id) && tag.TryGet("rid", out NbtInt realId))
if (tag.TryGet("id", out NbtString id) && tag.TryGet("rid", out var realId))
{
_entityIdentifiers[id.Value] = realId.Value;
int identifier = 0;

if (realId is NbtInt nbtInt)
identifier = nbtInt.Value;

if (realId is NbtByte nbtByte)
identifier = nbtByte.Value;

_entityIdentifiers[id.Value] = identifier;

if (LoggingConstants.LogServerEntityDefinitions)
#pragma warning disable CS0162
Expand Down
Loading

0 comments on commit 13404e8

Please sign in to comment.