Skip to content

Commit

Permalink
修改发包中集合的大小限制
Browse files Browse the repository at this point in the history
  • Loading branch information
TartaricAcid committed Sep 8, 2024
1 parent 05a2a11 commit afb4159
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public record ChessDataClientPackage(BlockPos pos, List<byte[]> chessData, Point
public static final StreamCodec<ByteBuf, List<byte[]>> BYTE_BUF_LIST_STREAM_CODEC = ByteBufCodecs.collection(
ArrayList::new,
ByteBufCodecs.BYTE_ARRAY,
20
15
);
public static final StreamCodec<ByteBuf, ChessDataClientPackage> STREAM_CODEC = StreamCodec.composite(
BlockPos.STREAM_CODEC,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ public record FoxScrollPackage(Map<String, List<FoxScrollData>> data) implements
public static final StreamCodec<RegistryFriendlyByteBuf, List<FoxScrollData>> LIST_STREAM_CODEC = ByteBufCodecs.collection(
ArrayList::new,
FoxScrollData.FOX_SCROLL_DATA_STREAM_CODEC,
20
1024
);

public static final StreamCodec<RegistryFriendlyByteBuf, Map<String, List<FoxScrollData>>> BYTE_BUF_MAP_STREAM_CODEC = ByteBufCodecs.map(
HashMap::new,
ByteBufCodecs.STRING_UTF8,
LIST_STREAM_CODEC,
20
1024
);

public static final StreamCodec<RegistryFriendlyByteBuf, FoxScrollPackage> STREAM_CODEC = StreamCodec.composite(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public record SaveSwitcherDataPackage(BlockPos pos,
ByteBufCodecs.collection(
ArrayList::new,
TileEntityModelSwitcher.ModeInfo.MODE_INFO_STREAM_CODEC,
20);
1024);

public static final StreamCodec<ByteBuf, SaveSwitcherDataPackage> STREAM_CODEC = StreamCodec.composite(
BlockPos.STREAM_CODEC,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public record SendEffectPackage(int id, Collection<MobEffectInstance> effects) i
ByteBufCodecs.collection(
ArrayList::new,
MobEffectInstance.STREAM_CODEC,
20);
256);

public static final StreamCodec<RegistryFriendlyByteBuf, SendEffectPackage> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.VAR_INT,
Expand Down

0 comments on commit afb4159

Please sign in to comment.