This commit is contained in:
basaigh 2023-08-13 15:45:41 +01:00
parent 48c189f651
commit 24d99ee043
3 changed files with 93 additions and 89 deletions

View file

@ -161,6 +161,8 @@ public class ServerListener extends SessionAdapter {
}
} else if (packet instanceof ServerboundConfigurationAcknowledgedPacket) {
protocol.setState(ProtocolState.CONFIGURATION);
} else if (packet instanceof ServerboundPingRequestPacket) {
session.send(new ClientboundPongResponsePacket(((ServerboundPingRequestPacket) packet).getPingTime()));
}
} else if (protocol.getState() == ProtocolState.CONFIGURATION) {
if (packet instanceof ServerboundFinishConfigurationPacket) {

View file

@ -208,9 +208,9 @@ public class MinecraftCodec {
}
public static final PacketCodec CODEC = PacketCodec.builder()
.protocolVersion((1 << 30) | 144)
.protocolVersion((1 << 30) | 145)
.helper(() -> new MinecraftCodecHelper(LEVEL_EVENTS, SOUND_NAMES))
.minecraftVersion("23w31a")
.minecraftVersion("23w32a")
.state(ProtocolState.HANDSHAKE, PacketStateCodec.builder()
.registerServerboundPacket(0x00, ClientIntentionPacket.class, ClientIntentionPacket::new)
)
@ -298,66 +298,67 @@ public class MinecraftCodec {
.registerClientboundPacket(0x32, ClientboundOpenScreenPacket.class, ClientboundOpenScreenPacket::new)
.registerClientboundPacket(0x33, ClientboundOpenSignEditorPacket.class, ClientboundOpenSignEditorPacket::new)
.registerClientboundPacket(0x34, ClientboundPingPacket.class, ClientboundPingPacket::new)
.registerClientboundPacket(0x35, ClientboundPlaceGhostRecipePacket.class, ClientboundPlaceGhostRecipePacket::new)
.registerClientboundPacket(0x36, ClientboundPlayerAbilitiesPacket.class, ClientboundPlayerAbilitiesPacket::new)
.registerClientboundPacket(0x37, ClientboundPlayerChatPacket.class, ClientboundPlayerChatPacket::new)
.registerClientboundPacket(0x38, ClientboundPlayerCombatEndPacket.class, ClientboundPlayerCombatEndPacket::new)
.registerClientboundPacket(0x39, ClientboundPlayerCombatEnterPacket.class, ClientboundPlayerCombatEnterPacket::new)
.registerClientboundPacket(0x3A, ClientboundPlayerCombatKillPacket.class, ClientboundPlayerCombatKillPacket::new)
.registerClientboundPacket(0x3B, ClientboundPlayerInfoRemovePacket.class, ClientboundPlayerInfoRemovePacket::new)
.registerClientboundPacket(0x3C, ClientboundPlayerInfoUpdatePacket.class, ClientboundPlayerInfoUpdatePacket::new)
.registerClientboundPacket(0x3D, ClientboundPlayerLookAtPacket.class, ClientboundPlayerLookAtPacket::new)
.registerClientboundPacket(0x3E, ClientboundPlayerPositionPacket.class, ClientboundPlayerPositionPacket::new)
.registerClientboundPacket(0x3F, ClientboundRecipePacket.class, ClientboundRecipePacket::new)
.registerClientboundPacket(0x40, ClientboundRemoveEntitiesPacket.class, ClientboundRemoveEntitiesPacket::new)
.registerClientboundPacket(0x41, ClientboundRemoveMobEffectPacket.class, ClientboundRemoveMobEffectPacket::new)
.registerClientboundPacket(0x42, ClientboundResourcePackPacket.class, ClientboundResourcePackPacket::new)
.registerClientboundPacket(0x43, ClientboundRespawnPacket.class, ClientboundRespawnPacket::new)
.registerClientboundPacket(0x44, ClientboundRotateHeadPacket.class, ClientboundRotateHeadPacket::new)
.registerClientboundPacket(0x45, ClientboundSectionBlocksUpdatePacket.class, ClientboundSectionBlocksUpdatePacket::new)
.registerClientboundPacket(0x46, ClientboundSelectAdvancementsTabPacket.class, ClientboundSelectAdvancementsTabPacket::new)
.registerClientboundPacket(0x47, ClientboundServerDataPacket.class, ClientboundServerDataPacket::new)
.registerClientboundPacket(0x48, ClientboundSetActionBarTextPacket.class, ClientboundSetActionBarTextPacket::new)
.registerClientboundPacket(0x49, ClientboundSetBorderCenterPacket.class, ClientboundSetBorderCenterPacket::new)
.registerClientboundPacket(0x4A, ClientboundSetBorderLerpSizePacket.class, ClientboundSetBorderLerpSizePacket::new)
.registerClientboundPacket(0x4B, ClientboundSetBorderSizePacket.class, ClientboundSetBorderSizePacket::new)
.registerClientboundPacket(0x4C, ClientboundSetBorderWarningDelayPacket.class, ClientboundSetBorderWarningDelayPacket::new)
.registerClientboundPacket(0x4D, ClientboundSetBorderWarningDistancePacket.class, ClientboundSetBorderWarningDistancePacket::new)
.registerClientboundPacket(0x4E, ClientboundSetCameraPacket.class, ClientboundSetCameraPacket::new)
.registerClientboundPacket(0x4F, ClientboundSetCarriedItemPacket.class, ClientboundSetCarriedItemPacket::new)
.registerClientboundPacket(0x50, ClientboundSetChunkCacheCenterPacket.class, ClientboundSetChunkCacheCenterPacket::new)
.registerClientboundPacket(0x51, ClientboundSetChunkCacheRadiusPacket.class, ClientboundSetChunkCacheRadiusPacket::new)
.registerClientboundPacket(0x52, ClientboundSetDefaultSpawnPositionPacket.class, ClientboundSetDefaultSpawnPositionPacket::new)
.registerClientboundPacket(0x53, ClientboundSetDisplayObjectivePacket.class, ClientboundSetDisplayObjectivePacket::new)
.registerClientboundPacket(0x54, ClientboundSetEntityDataPacket.class, ClientboundSetEntityDataPacket::new)
.registerClientboundPacket(0x55, ClientboundSetEntityLinkPacket.class, ClientboundSetEntityLinkPacket::new)
.registerClientboundPacket(0x56, ClientboundSetEntityMotionPacket.class, ClientboundSetEntityMotionPacket::new)
.registerClientboundPacket(0x57, ClientboundSetEquipmentPacket.class, ClientboundSetEquipmentPacket::new)
.registerClientboundPacket(0x58, ClientboundSetExperiencePacket.class, ClientboundSetExperiencePacket::new)
.registerClientboundPacket(0x59, ClientboundSetHealthPacket.class, ClientboundSetHealthPacket::new)
.registerClientboundPacket(0x5A, ClientboundSetObjectivePacket.class, ClientboundSetObjectivePacket::new)
.registerClientboundPacket(0x5B, ClientboundSetPassengersPacket.class, ClientboundSetPassengersPacket::new)
.registerClientboundPacket(0x5C, ClientboundSetPlayerTeamPacket.class, ClientboundSetPlayerTeamPacket::new)
.registerClientboundPacket(0x5D, ClientboundSetScorePacket.class, ClientboundSetScorePacket::new)
.registerClientboundPacket(0x5E, ClientboundSetSimulationDistancePacket.class, ClientboundSetSimulationDistancePacket::new)
.registerClientboundPacket(0x5F, ClientboundSetSubtitleTextPacket.class, ClientboundSetSubtitleTextPacket::new)
.registerClientboundPacket(0x60, ClientboundSetTimePacket.class, ClientboundSetTimePacket::new)
.registerClientboundPacket(0x61, ClientboundSetTitleTextPacket.class, ClientboundSetTitleTextPacket::new)
.registerClientboundPacket(0x62, ClientboundSetTitlesAnimationPacket.class, ClientboundSetTitlesAnimationPacket::new)
.registerClientboundPacket(0x63, ClientboundSoundEntityPacket.class, ClientboundSoundEntityPacket::new)
.registerClientboundPacket(0x64, ClientboundSoundPacket.class, ClientboundSoundPacket::new)
.registerClientboundPacket(0x65, ClientboundStartConfigurationPacket.class, ClientboundStartConfigurationPacket::new)
.registerClientboundPacket(0x66, ClientboundStopSoundPacket.class, ClientboundStopSoundPacket::new)
.registerClientboundPacket(0x67, ClientboundSystemChatPacket.class, ClientboundSystemChatPacket::new)
.registerClientboundPacket(0x68, ClientboundTabListPacket.class, ClientboundTabListPacket::new)
.registerClientboundPacket(0x69, ClientboundTagQueryPacket.class, ClientboundTagQueryPacket::new)
.registerClientboundPacket(0x6A, ClientboundTakeItemEntityPacket.class, ClientboundTakeItemEntityPacket::new)
.registerClientboundPacket(0x6B, ClientboundTeleportEntityPacket.class, ClientboundTeleportEntityPacket::new)
.registerClientboundPacket(0x6C, ClientboundUpdateAdvancementsPacket.class, ClientboundUpdateAdvancementsPacket::new)
.registerClientboundPacket(0x6D, ClientboundUpdateAttributesPacket.class, ClientboundUpdateAttributesPacket::new)
.registerClientboundPacket(0x6E, ClientboundUpdateMobEffectPacket.class, ClientboundUpdateMobEffectPacket::new)
.registerClientboundPacket(0x6F, ClientboundUpdateRecipesPacket.class, ClientboundUpdateRecipesPacket::new)
.registerClientboundPacket(0x70, ClientboundUpdateTagsPacket.class, ClientboundUpdateTagsPacket::new)
.registerClientboundPacket(0x35, ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new)
.registerClientboundPacket(0x36, ClientboundPlaceGhostRecipePacket.class, ClientboundPlaceGhostRecipePacket::new)
.registerClientboundPacket(0x37, ClientboundPlayerAbilitiesPacket.class, ClientboundPlayerAbilitiesPacket::new)
.registerClientboundPacket(0x38, ClientboundPlayerChatPacket.class, ClientboundPlayerChatPacket::new)
.registerClientboundPacket(0x39, ClientboundPlayerCombatEndPacket.class, ClientboundPlayerCombatEndPacket::new)
.registerClientboundPacket(0x3A, ClientboundPlayerCombatEnterPacket.class, ClientboundPlayerCombatEnterPacket::new)
.registerClientboundPacket(0x3B, ClientboundPlayerCombatKillPacket.class, ClientboundPlayerCombatKillPacket::new)
.registerClientboundPacket(0x3C, ClientboundPlayerInfoRemovePacket.class, ClientboundPlayerInfoRemovePacket::new)
.registerClientboundPacket(0x3D, ClientboundPlayerInfoUpdatePacket.class, ClientboundPlayerInfoUpdatePacket::new)
.registerClientboundPacket(0x3E, ClientboundPlayerLookAtPacket.class, ClientboundPlayerLookAtPacket::new)
.registerClientboundPacket(0x3F, ClientboundPlayerPositionPacket.class, ClientboundPlayerPositionPacket::new)
.registerClientboundPacket(0x40, ClientboundRecipePacket.class, ClientboundRecipePacket::new)
.registerClientboundPacket(0x41, ClientboundRemoveEntitiesPacket.class, ClientboundRemoveEntitiesPacket::new)
.registerClientboundPacket(0x42, ClientboundRemoveMobEffectPacket.class, ClientboundRemoveMobEffectPacket::new)
.registerClientboundPacket(0x43, ClientboundResourcePackPacket.class, ClientboundResourcePackPacket::new)
.registerClientboundPacket(0x44, ClientboundRespawnPacket.class, ClientboundRespawnPacket::new)
.registerClientboundPacket(0x45, ClientboundRotateHeadPacket.class, ClientboundRotateHeadPacket::new)
.registerClientboundPacket(0x46, ClientboundSectionBlocksUpdatePacket.class, ClientboundSectionBlocksUpdatePacket::new)
.registerClientboundPacket(0x47, ClientboundSelectAdvancementsTabPacket.class, ClientboundSelectAdvancementsTabPacket::new)
.registerClientboundPacket(0x48, ClientboundServerDataPacket.class, ClientboundServerDataPacket::new)
.registerClientboundPacket(0x49, ClientboundSetActionBarTextPacket.class, ClientboundSetActionBarTextPacket::new)
.registerClientboundPacket(0x4A, ClientboundSetBorderCenterPacket.class, ClientboundSetBorderCenterPacket::new)
.registerClientboundPacket(0x4B, ClientboundSetBorderLerpSizePacket.class, ClientboundSetBorderLerpSizePacket::new)
.registerClientboundPacket(0x4C, ClientboundSetBorderSizePacket.class, ClientboundSetBorderSizePacket::new)
.registerClientboundPacket(0x4D, ClientboundSetBorderWarningDelayPacket.class, ClientboundSetBorderWarningDelayPacket::new)
.registerClientboundPacket(0x4E, ClientboundSetBorderWarningDistancePacket.class, ClientboundSetBorderWarningDistancePacket::new)
.registerClientboundPacket(0x4F, ClientboundSetCameraPacket.class, ClientboundSetCameraPacket::new)
.registerClientboundPacket(0x50, ClientboundSetCarriedItemPacket.class, ClientboundSetCarriedItemPacket::new)
.registerClientboundPacket(0x51, ClientboundSetChunkCacheCenterPacket.class, ClientboundSetChunkCacheCenterPacket::new)
.registerClientboundPacket(0x52, ClientboundSetChunkCacheRadiusPacket.class, ClientboundSetChunkCacheRadiusPacket::new)
.registerClientboundPacket(0x53, ClientboundSetDefaultSpawnPositionPacket.class, ClientboundSetDefaultSpawnPositionPacket::new)
.registerClientboundPacket(0x54, ClientboundSetDisplayObjectivePacket.class, ClientboundSetDisplayObjectivePacket::new)
.registerClientboundPacket(0x55, ClientboundSetEntityDataPacket.class, ClientboundSetEntityDataPacket::new)
.registerClientboundPacket(0x56, ClientboundSetEntityLinkPacket.class, ClientboundSetEntityLinkPacket::new)
.registerClientboundPacket(0x57, ClientboundSetEntityMotionPacket.class, ClientboundSetEntityMotionPacket::new)
.registerClientboundPacket(0x58, ClientboundSetEquipmentPacket.class, ClientboundSetEquipmentPacket::new)
.registerClientboundPacket(0x59, ClientboundSetExperiencePacket.class, ClientboundSetExperiencePacket::new)
.registerClientboundPacket(0x5A, ClientboundSetHealthPacket.class, ClientboundSetHealthPacket::new)
.registerClientboundPacket(0x5B, ClientboundSetObjectivePacket.class, ClientboundSetObjectivePacket::new)
.registerClientboundPacket(0x5C, ClientboundSetPassengersPacket.class, ClientboundSetPassengersPacket::new)
.registerClientboundPacket(0x5D, ClientboundSetPlayerTeamPacket.class, ClientboundSetPlayerTeamPacket::new)
.registerClientboundPacket(0x5E, ClientboundSetScorePacket.class, ClientboundSetScorePacket::new)
.registerClientboundPacket(0x5F, ClientboundSetSimulationDistancePacket.class, ClientboundSetSimulationDistancePacket::new)
.registerClientboundPacket(0x60, ClientboundSetSubtitleTextPacket.class, ClientboundSetSubtitleTextPacket::new)
.registerClientboundPacket(0x61, ClientboundSetTimePacket.class, ClientboundSetTimePacket::new)
.registerClientboundPacket(0x62, ClientboundSetTitleTextPacket.class, ClientboundSetTitleTextPacket::new)
.registerClientboundPacket(0x63, ClientboundSetTitlesAnimationPacket.class, ClientboundSetTitlesAnimationPacket::new)
.registerClientboundPacket(0x64, ClientboundSoundEntityPacket.class, ClientboundSoundEntityPacket::new)
.registerClientboundPacket(0x65, ClientboundSoundPacket.class, ClientboundSoundPacket::new)
.registerClientboundPacket(0x66, ClientboundStartConfigurationPacket.class, ClientboundStartConfigurationPacket::new)
.registerClientboundPacket(0x67, ClientboundStopSoundPacket.class, ClientboundStopSoundPacket::new)
.registerClientboundPacket(0x68, ClientboundSystemChatPacket.class, ClientboundSystemChatPacket::new)
.registerClientboundPacket(0x69, ClientboundTabListPacket.class, ClientboundTabListPacket::new)
.registerClientboundPacket(0x6A, ClientboundTagQueryPacket.class, ClientboundTagQueryPacket::new)
.registerClientboundPacket(0x6B, ClientboundTakeItemEntityPacket.class, ClientboundTakeItemEntityPacket::new)
.registerClientboundPacket(0x6C, ClientboundTeleportEntityPacket.class, ClientboundTeleportEntityPacket::new)
.registerClientboundPacket(0x6D, ClientboundUpdateAdvancementsPacket.class, ClientboundUpdateAdvancementsPacket::new)
.registerClientboundPacket(0x6E, ClientboundUpdateAttributesPacket.class, ClientboundUpdateAttributesPacket::new)
.registerClientboundPacket(0x6F, ClientboundUpdateMobEffectPacket.class, ClientboundUpdateMobEffectPacket::new)
.registerClientboundPacket(0x70, ClientboundUpdateRecipesPacket.class, ClientboundUpdateRecipesPacket::new)
.registerClientboundPacket(0x71, ClientboundUpdateTagsPacket.class, ClientboundUpdateTagsPacket::new)
.registerServerboundPacket(0x00, ServerboundAcceptTeleportationPacket.class, ServerboundAcceptTeleportationPacket::new)
.registerServerboundPacket(0x01, ServerboundBlockEntityTagQuery.class, ServerboundBlockEntityTagQuery::new)
.registerServerboundPacket(0x02, ServerboundChangeDifficultyPacket.class, ServerboundChangeDifficultyPacket::new)
@ -387,30 +388,31 @@ public class MinecraftCodec {
.registerServerboundPacket(0x1A, ServerboundMoveVehiclePacket.class, ServerboundMoveVehiclePacket::new)
.registerServerboundPacket(0x1B, ServerboundPaddleBoatPacket.class, ServerboundPaddleBoatPacket::new)
.registerServerboundPacket(0x1C, ServerboundPickItemPacket.class, ServerboundPickItemPacket::new)
.registerServerboundPacket(0x1D, ServerboundPlaceRecipePacket.class, ServerboundPlaceRecipePacket::new)
.registerServerboundPacket(0x1E, ServerboundPlayerAbilitiesPacket.class, ServerboundPlayerAbilitiesPacket::new)
.registerServerboundPacket(0x1F, ServerboundPlayerActionPacket.class, ServerboundPlayerActionPacket::new)
.registerServerboundPacket(0x20, ServerboundPlayerCommandPacket.class, ServerboundPlayerCommandPacket::new)
.registerServerboundPacket(0x21, ServerboundPlayerInputPacket.class, ServerboundPlayerInputPacket::new)
.registerServerboundPacket(0x22, ServerboundPongPacket.class, ServerboundPongPacket::new)
.registerServerboundPacket(0x23, ServerboundRecipeBookChangeSettingsPacket.class, ServerboundRecipeBookChangeSettingsPacket::new)
.registerServerboundPacket(0x24, ServerboundRecipeBookSeenRecipePacket.class, ServerboundRecipeBookSeenRecipePacket::new)
.registerServerboundPacket(0x25, ServerboundRenameItemPacket.class, ServerboundRenameItemPacket::new)
.registerServerboundPacket(0x26, ServerboundResourcePackPacket.class, ServerboundResourcePackPacket::new)
.registerServerboundPacket(0x27, ServerboundSeenAdvancementsPacket.class, ServerboundSeenAdvancementsPacket::new)
.registerServerboundPacket(0x28, ServerboundSelectTradePacket.class, ServerboundSelectTradePacket::new)
.registerServerboundPacket(0x29, ServerboundSetBeaconPacket.class, ServerboundSetBeaconPacket::new)
.registerServerboundPacket(0x2A, ServerboundSetCarriedItemPacket.class, ServerboundSetCarriedItemPacket::new)
.registerServerboundPacket(0x2B, ServerboundSetCommandBlockPacket.class, ServerboundSetCommandBlockPacket::new)
.registerServerboundPacket(0x2C, ServerboundSetCommandMinecartPacket.class, ServerboundSetCommandMinecartPacket::new)
.registerServerboundPacket(0x2D, ServerboundSetCreativeModeSlotPacket.class, ServerboundSetCreativeModeSlotPacket::new)
.registerServerboundPacket(0x2E, ServerboundSetJigsawBlockPacket.class, ServerboundSetJigsawBlockPacket::new)
.registerServerboundPacket(0x2F, ServerboundSetStructureBlockPacket.class, ServerboundSetStructureBlockPacket::new)
.registerServerboundPacket(0x30, ServerboundSignUpdatePacket.class, ServerboundSignUpdatePacket::new)
.registerServerboundPacket(0x31, ServerboundSwingPacket.class, ServerboundSwingPacket::new)
.registerServerboundPacket(0x32, ServerboundTeleportToEntityPacket.class, ServerboundTeleportToEntityPacket::new)
.registerServerboundPacket(0x33, ServerboundUseItemOnPacket.class, ServerboundUseItemOnPacket::new)
.registerServerboundPacket(0x34, ServerboundUseItemPacket.class, ServerboundUseItemPacket::new)
.registerServerboundPacket(0x1D, ServerboundPingRequestPacket.class, ServerboundPingRequestPacket::new)
.registerServerboundPacket(0x1E, ServerboundPlaceRecipePacket.class, ServerboundPlaceRecipePacket::new)
.registerServerboundPacket(0x1F, ServerboundPlayerAbilitiesPacket.class, ServerboundPlayerAbilitiesPacket::new)
.registerServerboundPacket(0x20, ServerboundPlayerActionPacket.class, ServerboundPlayerActionPacket::new)
.registerServerboundPacket(0x21, ServerboundPlayerCommandPacket.class, ServerboundPlayerCommandPacket::new)
.registerServerboundPacket(0x22, ServerboundPlayerInputPacket.class, ServerboundPlayerInputPacket::new)
.registerServerboundPacket(0x23, ServerboundPongPacket.class, ServerboundPongPacket::new)
.registerServerboundPacket(0x24, ServerboundRecipeBookChangeSettingsPacket.class, ServerboundRecipeBookChangeSettingsPacket::new)
.registerServerboundPacket(0x25, ServerboundRecipeBookSeenRecipePacket.class, ServerboundRecipeBookSeenRecipePacket::new)
.registerServerboundPacket(0x26, ServerboundRenameItemPacket.class, ServerboundRenameItemPacket::new)
.registerServerboundPacket(0x27, ServerboundResourcePackPacket.class, ServerboundResourcePackPacket::new)
.registerServerboundPacket(0x28, ServerboundSeenAdvancementsPacket.class, ServerboundSeenAdvancementsPacket::new)
.registerServerboundPacket(0x29, ServerboundSelectTradePacket.class, ServerboundSelectTradePacket::new)
.registerServerboundPacket(0x2A, ServerboundSetBeaconPacket.class, ServerboundSetBeaconPacket::new)
.registerServerboundPacket(0x2B, ServerboundSetCarriedItemPacket.class, ServerboundSetCarriedItemPacket::new)
.registerServerboundPacket(0x2C, ServerboundSetCommandBlockPacket.class, ServerboundSetCommandBlockPacket::new)
.registerServerboundPacket(0x2D, ServerboundSetCommandMinecartPacket.class, ServerboundSetCommandMinecartPacket::new)
.registerServerboundPacket(0x2E, ServerboundSetCreativeModeSlotPacket.class, ServerboundSetCreativeModeSlotPacket::new)
.registerServerboundPacket(0x2F, ServerboundSetJigsawBlockPacket.class, ServerboundSetJigsawBlockPacket::new)
.registerServerboundPacket(0x30, ServerboundSetStructureBlockPacket.class, ServerboundSetStructureBlockPacket::new)
.registerServerboundPacket(0x31, ServerboundSignUpdatePacket.class, ServerboundSignUpdatePacket::new)
.registerServerboundPacket(0x32, ServerboundSwingPacket.class, ServerboundSwingPacket::new)
.registerServerboundPacket(0x33, ServerboundTeleportToEntityPacket.class, ServerboundTeleportToEntityPacket::new)
.registerServerboundPacket(0x34, ServerboundUseItemOnPacket.class, ServerboundUseItemOnPacket::new)
.registerServerboundPacket(0x35, ServerboundUseItemPacket.class, ServerboundUseItemPacket::new)
)
.build();
}

View file

@ -11,13 +11,13 @@ import lombok.With;
@With
@AllArgsConstructor
public class ServerboundChunkBatchReceivedPacket implements MinecraftPacket {
private final float desiredBatchSize;
private final float desiredChunksPerTick;
public ServerboundChunkBatchReceivedPacket(ByteBuf in, MinecraftCodecHelper helper) {
this.desiredBatchSize = in.readFloat();
this.desiredChunksPerTick = in.readFloat();
}
public void serialize(ByteBuf out, MinecraftCodecHelper helper) {
out.writeFloat(this.desiredBatchSize);
out.writeFloat(this.desiredChunksPerTick);
}
}