进一步优化PlayerVariablesSyncMessage编码

This commit is contained in:
Light_Quanta 2025-04-18 20:50:36 +08:00
parent b728a04ba1
commit 70dc4c5bb0
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -18,7 +18,7 @@ public record PlayerVariablesSyncMessage(int target, Map<Byte, Integer> data) im
public static final CustomPacketPayload.Type<PlayerVariablesSyncMessage> TYPE = new CustomPacketPayload.Type<>(Mod.loc("player_variable_sync"));
public static final StreamCodec<ByteBuf, PlayerVariablesSyncMessage> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.INT,
ByteBufCodecs.VAR_INT,
PlayerVariablesSyncMessage::target,
ByteBufCodecs.map(
HashMap::new,