Skip to content

Commit

Permalink
chores: change some field value in start game packet to match vanilla…
Browse files Browse the repository at this point in the history
… behavior
  • Loading branch information
smartcmd committed Oct 23, 2024
1 parent ca3baff commit 636a952
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions api/src/main/java/org/allaymc/api/server/ServerSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public static class NetworkSettings extends OkaeriConfig {
@Accessors(fluent = true)
public static class WorldConfig extends OkaeriConfig {

@CustomKey("ticking-radius")
private int tickingRadius = 8;
@CustomKey("tick-radius")
private int tickRadius = 8;

@CustomKey("view-distance")
private int viewDistance = 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.allaymc.api.item.ItemStack;
import org.allaymc.api.item.recipe.Recipe;
import org.allaymc.api.math.location.Location3f;
import org.allaymc.api.network.ProtocolInfo;
import org.allaymc.api.pack.Pack;
import org.allaymc.api.registry.Registries;
import org.allaymc.api.server.Server;
Expand Down Expand Up @@ -310,8 +311,8 @@ public void initializePlayer() {
startGamePacket.setLevelName(Server.SETTINGS.genericSettings().motd());
startGamePacket.setLevelId("");
startGamePacket.setDefaultPlayerPermission(Server.SETTINGS.genericSettings().defaultPermission());
startGamePacket.setServerChunkTickRange(spawnWorld.getWorldData().getServerChunkTickRange());
startGamePacket.setVanillaVersion(server.getNetworkServer().getCodec().getMinecraftVersion());
startGamePacket.setServerChunkTickRange(Server.SETTINGS.worldSettings().tickRadius());
startGamePacket.setVanillaVersion("*");
startGamePacket.setPremiumWorldTemplateId("");
startGamePacket.setInventoriesServerAuthoritative(true);
startGamePacket.setItemDefinitions(DeferredData.getItemDefinitions());
Expand All @@ -324,7 +325,7 @@ public void initializePlayer() {
startGamePacket.setMultiplayerCorrelationId(UUID.randomUUID().toString());
startGamePacket.setXblBroadcastMode(GamePublishSetting.PUBLIC);
startGamePacket.setPlatformBroadcastMode(GamePublishSetting.PUBLIC);
startGamePacket.setServerEngine("Allay");
startGamePacket.setServerEngine(ProtocolInfo.getMinecraftVersionStr());
startGamePacket.setBlockRegistryChecksum(0L);
startGamePacket.setPlayerPropertyData(NbtMap.EMPTY);
startGamePacket.setWorldTemplateId(new UUID(0, 0));
Expand Down

0 comments on commit 636a952

Please sign in to comment.