Skip to content

Commit

Permalink
fix: compile
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolLoong committed Jun 14, 2024
1 parent 3c82c63 commit d5dfc63
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/dev/waterdog/waterdogpe/CustomNetworkSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.cloudburstmc.protocol.common.util.TypeMap;

import java.util.List;
import java.util.function.Supplier;

public class CustomNetworkSettings extends Bedrock_v685 {

Expand Down Expand Up @@ -93,6 +94,15 @@ public class CustomNetworkSettings extends Bedrock_v685 {
.deregisterPacket(TickSyncPacket.class) // this packet is now deprecated
.build();


public static final Supplier<EncodingSettings> SETTINGS = () -> EncodingSettings.builder()
.maxByteArraySize(ProxyServer.getInstance().getConfiguration().getNetworkSettings().maxByteArraySize())
.maxListSize(ProxyServer.getInstance().getConfiguration().getNetworkSettings().maxListSize())
.maxNetworkNBTSize(ProxyServer.getInstance().getConfiguration().getNetworkSettings().maxNetworkNBTSize())
.maxItemNBTSize(ProxyServer.getInstance().getConfiguration().getNetworkSettings().maxItemNBTSize())
.maxStringLength(ProxyServer.getInstance().getConfiguration().getNetworkSettings().maxStringLength())
.build();

private static class CustomBedrockCodecHelper_v575 extends BedrockCodecHelper_v575 {
public CustomBedrockCodecHelper_v575(EntityDataTypeMap entityData, TypeMap<Class<?>> gameRulesTypes, TypeMap<ItemStackRequestActionType> stackRequestActionTypes, TypeMap<ContainerSlotType> containerSlotTypes, TypeMap<Ability> abilities, TypeMap<TextProcessingEventOrigin> textProcessingEventOrigins) {
super(entityData, gameRulesTypes, stackRequestActionTypes, containerSlotTypes, abilities, textProcessingEventOrigins);
Expand Down

0 comments on commit d5dfc63

Please sign in to comment.