Skip to content

Commit

Permalink
1.21.40 support; Switch to NetworkCompatible sub (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Castle <[email protected]>
  • Loading branch information
Kas-tle authored Nov 12, 2024
1 parent 8de7a22 commit f63bf97
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
branch = 3.0-proxypass
[submodule "network"]
path = network
url = https://github.com/Kas-tle/Network.git
branch = feature/compatibility-mode
url = https://github.com/Kas-tle/NetworkCompatible.git
branch = master
2 changes: 1 addition & 1 deletion network
Submodule network updated 48 files
+13 −0 .github/setup-gradle-composite/action.yml
+19 −0 .github/workflows/build.yml
+0 −16 .github/workflows/deploy-release.yml
+0 −16 .github/workflows/deploy-snapshot.yml
+0 −39 .github/workflows/deploy.yml
+54 −0 .github/workflows/publish.yml
+0 −6 .idea/copyright/APL.xml
+0 −7 .idea/copyright/profiles_settings.xml
+15 −45 README.md
+34 −25 build.gradle.kts
+0 −32 codec-query/pom.xml
+0 −102 codec-query/src/main/java/org/cloudburstmc/netty/handler/codec/query/QueryEventListener.java
+0 −62 codec-query/src/main/java/org/cloudburstmc/netty/handler/codec/query/QueryNetworkListener.java
+0 −16 codec-query/src/main/java/org/cloudburstmc/netty/handler/codec/query/QueryPacket.java
+0 −32 codec-query/src/main/java/org/cloudburstmc/netty/handler/codec/query/QueryUtil.java
+0 −64 codec-query/src/main/java/org/cloudburstmc/netty/handler/codec/query/codec/QueryPacketCodec.java
+0 −16 codec-query/src/main/java/org/cloudburstmc/netty/handler/codec/query/enveloped/DirectAddressedQueryPacket.java
+0 −79 codec-query/src/main/java/org/cloudburstmc/netty/handler/codec/query/handler/QueryPacketHandler.java
+0 −47 codec-query/src/main/java/org/cloudburstmc/netty/handler/codec/query/packet/HandshakePacket.java
+0 −68 codec-query/src/main/java/org/cloudburstmc/netty/handler/codec/query/packet/StatisticsPacket.java
+0 −23 codec-rcon/pom.xml
+0 −45 codec-rcon/src/main/java/org/cloudburstmc/netty/handler/codec/rcon/RconCodec.java
+0 −6 codec-rcon/src/main/java/org/cloudburstmc/netty/handler/codec/rcon/RconEventListener.java
+0 −30 codec-rcon/src/main/java/org/cloudburstmc/netty/handler/codec/rcon/RconMessage.java
+0 −79 codec-rcon/src/main/java/org/cloudburstmc/netty/handler/codec/rcon/RconNetworkListener.java
+0 −46 codec-rcon/src/main/java/org/cloudburstmc/netty/handler/codec/rcon/handler/RconHandler.java
+2 −17 gradle.properties
+1 −1 gradle/libs.versions.toml
+1 −1 gradle/wrapper/gradle-wrapper.properties
+92 −92 gradlew.bat
+5 −0 jitpack.yml
+33 −19 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakChannelFactory.java
+4 −2 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakChildChannel.java
+3 −0 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakConstants.java
+19 −4 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakServerChannel.java
+31 −1 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/config/DefaultRakClientConfig.java
+8 −2 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/config/RakChannelMetrics.java
+13 −0 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/config/RakChannelOption.java
+3 −3 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/packet/EncapsulatedPacket.java
+17 −7 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/client/RakClientOfflineHandler.java
+24 −8 ...-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/client/RakClientOnlineInitialHandler.java
+3 −1 ...ort-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/client/RakClientProxyRouteHandler.java
+7 −0 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/common/RakDatagramCodec.java
+11 −1 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/common/RakSessionCodec.java
+2 −1 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/server/RakChildDatagramHandler.java
+41 −37 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/server/RakServerOfflineHandler.java
+1 −1 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/server/RakServerRateLimiter.java
+5 −0 transport-raknet/src/main/java/org/cloudburstmc/netty/util/RakUtils.java
2 changes: 1 addition & 1 deletion protocol
Submodule protocol updated 45 files
+2 −0 README.md
+1 −1 ...src/main/java/org/cloudburstmc/protocol/bedrock/codec/v291/serializer/ResourcePacksInfoSerializer_v291.java
+1 −1 ...src/main/java/org/cloudburstmc/protocol/bedrock/codec/v332/serializer/ResourcePacksInfoSerializer_v332.java
+1 −1 ...ava/org/cloudburstmc/protocol/bedrock/codec/v419/serializer/CorrectPlayerMovePredictionSerializer_v419.java
+1 −1 ...src/main/java/org/cloudburstmc/protocol/bedrock/codec/v422/serializer/ResourcePacksInfoSerializer_v422.java
+1 −1 .../src/main/java/org/cloudburstmc/protocol/bedrock/codec/v618/serializer/CameraInstructionSerializer_618.java
+1 −1 ...dec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v618/serializer/CameraPresetsSerializer_v618.java
+51 −6 ...src/main/java/org/cloudburstmc/protocol/bedrock/codec/v618/serializer/ResourcePacksInfoSerializer_v618.java
+2 −1 ...ava/org/cloudburstmc/protocol/bedrock/codec/v671/serializer/CorrectPlayerMovePredictionSerializer_v671.java
+2 −2 .../main/java/org/cloudburstmc/protocol/bedrock/codec/v671/serializer/UpdatePlayerGameTypeSerializer_v671.java
+4 −5 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v685/Bedrock_v685.java
+1 −2 ...src/main/java/org/cloudburstmc/protocol/bedrock/codec/v712/serializer/CameraInstructionSerializer_v712.java
+1 −1 ...dec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v712/serializer/CameraPresetsSerializer_v712.java
+1 −1 ...src/main/java/org/cloudburstmc/protocol/bedrock/codec/v712/serializer/ResourcePacksInfoSerializer_v712.java
+1 −2 ...dec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v729/serializer/CameraPresetsSerializer_v729.java
+28 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/Bedrock_v748.java
+51 −0 ...src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/CameraInstructionSerializer_v748.java
+70 −0 ...dec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/CameraPresetsSerializer_v748.java
+60 −0 ...odec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/CraftingDataSerializer_v748.java
+30 −0 .../src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/InventoryContentSerializer_v748.java
+32 −0 ...dec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/InventorySlotSerializer_v748.java
+26 −0 ...k-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/MobEffectSerializer_v748.java
+31 −0 ...ec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/MovementEffectSerializer_v748.java
+99 −0 ...c/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/PlayerAuthInputSerializer_v748.java
+51 −0 ...src/main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/ResourcePacksInfoSerializer_v748.java
+25 −0 .../main/java/org/cloudburstmc/protocol/bedrock/codec/v748/serializer/SetMovementAuthoritySerializer_v748.java
+25 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/MovementEffectType.java
+5 −1 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/PlayerActionType.java
+20 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/PlayerAuthInputData.java
+22 −1 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/camera/CameraPreset.java
+7 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/camera/CameraSetInstruction.java
+1 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/inventory/ContainerId.java
+1 −1 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/inventory/crafting/CraftingDataType.java
+8 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/BedrockPacketHandler.java
+2 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/BedrockPacketType.java
+7 −1 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/InventoryContentPacket.java
+7 −1 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/InventorySlotPacket.java
+36 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/MovementEffectPacket.java
+11 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/PlayerAuthInputPacket.java
+16 −24 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/ResourcePacksInfoPacket.java
+33 −0 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/SetMovementAuthorityPacket.java
+1 −1 bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/packet/UpdatePlayerGameTypePacket.java
+2 −2 gradle/libs.versions.toml
+1 −1 gradle/wrapper/gradle-wrapper.properties
+4 −0 settings.gradle.kts
8 changes: 5 additions & 3 deletions src/main/java/org/cloudburstmc/proxypass/ProxyPass.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.cloudburstmc.protocol.bedrock.BedrockPong;
import org.cloudburstmc.protocol.bedrock.codec.BedrockCodec;
import org.cloudburstmc.protocol.bedrock.codec.BedrockCodecHelper;
import org.cloudburstmc.protocol.bedrock.codec.v729.Bedrock_v729;
import org.cloudburstmc.protocol.bedrock.codec.v748.Bedrock_v748;
import org.cloudburstmc.protocol.bedrock.data.EncodingSettings;
import org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition;
import org.cloudburstmc.protocol.bedrock.netty.initializer.BedrockChannelInitializer;
Expand Down Expand Up @@ -64,8 +64,8 @@ public class ProxyPass {
public static final ObjectMapper JSON_MAPPER;
public static final YAMLMapper YAML_MAPPER = (YAMLMapper) new YAMLMapper().disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
public static final String MINECRAFT_VERSION;
public static final BedrockCodecHelper HELPER = Bedrock_v729.CODEC.createHelper();
public static final BedrockCodec CODEC = Bedrock_v729.CODEC
public static final BedrockCodecHelper HELPER = Bedrock_v748.CODEC.createHelper();
public static final BedrockCodec CODEC = Bedrock_v748.CODEC
.toBuilder().helper(() -> HELPER).build();

public static final int PROTOCOL_VERSION = CODEC.getProtocolVersion();
Expand Down Expand Up @@ -232,6 +232,8 @@ public void newClient(InetSocketAddress socketAddress, Consumer<ProxyClientSessi
.option(RakChannelOption.RAK_IP_DONT_FRAGMENT, true)
.option(RakChannelOption.RAK_MTU_SIZES, new Integer[]{1492, 1200, 576})
.option(RakChannelOption.RAK_CLIENT_INTERNAL_ADDRESSES, 20)
.option(RakChannelOption.RAK_TIME_BETWEEN_SEND_CONNECTION_ATTEMPTS_MS, 500)
.option(RakChannelOption.RAK_CLIENT_BEDROCK_PROTOCOL_VERSION, PROTOCOL_VERSION)
.handler(new BedrockChannelInitializer<ProxyClientSession>() {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ private void initializeOnlineProxySession() {
downstream.setPacketHandler(new DownstreamInitialPacketHandler(downstream, proxySession, this.proxy, login));
downstream.setLogging(true);

RequestNetworkSettingsPacket packet = new RequestNetworkSettingsPacket();
packet.setProtocolVersion(ProxyPass.PROTOCOL_VERSION);
downstream.sendPacketImmediately(packet);
this.player.logger.logPacket(this.session, packet, true);
// RequestNetworkSettingsPacket packet = new RequestNetworkSettingsPacket();
// packet.setProtocolVersion(ProxyPass.PROTOCOL_VERSION);
// downstream.sendPacketImmediately(packet);
// this.player.logger.logPacket(this.session, packet, true);

//SkinUtils.saveSkin(proxySession, this.skinData);
});
Expand Down

0 comments on commit f63bf97

Please sign in to comment.