From f59e2a2de4c7ec15079e0e50264301838fb6006c Mon Sep 17 00:00:00 2001 From: DavyCraft648 <67502532+DavyCraft648@users.noreply.github.com> Date: Sun, 17 Nov 2024 18:21:02 +0700 Subject: [PATCH] Fix Equippable allowed entities reading (#4267) --- .../viaversion/api/minecraft/item/data/Equippable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/com/viaversion/viaversion/api/minecraft/item/data/Equippable.java b/api/src/main/java/com/viaversion/viaversion/api/minecraft/item/data/Equippable.java index ee6a286f6..5c90d29a1 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/minecraft/item/data/Equippable.java +++ b/api/src/main/java/com/viaversion/viaversion/api/minecraft/item/data/Equippable.java @@ -42,7 +42,7 @@ public record Equippable(int equipmentSlot, Holder soundEvent, @Null final Holder soundEvent = Types.SOUND_EVENT.read(buffer); final String model = Types.OPTIONAL_STRING.read(buffer); final String cameraOverlay = Types.OPTIONAL_STRING.read(buffer); - final HolderSet allowedEntities = Types.HOLDER_SET.read(buffer); + final HolderSet allowedEntities = Types.OPTIONAL_HOLDER_SET.read(buffer); final boolean dispensable = buffer.readBoolean(); final boolean swappable = buffer.readBoolean(); final boolean damageOnHurt = buffer.readBoolean(); @@ -55,7 +55,7 @@ public record Equippable(int equipmentSlot, Holder soundEvent, @Null Types.SOUND_EVENT.write(buffer, value.soundEvent()); Types.OPTIONAL_STRING.write(buffer, value.model()); Types.OPTIONAL_STRING.write(buffer, value.cameraOverlay()); - Types.HOLDER_SET.write(buffer, value.allowedEntities()); + Types.OPTIONAL_HOLDER_SET.write(buffer, value.allowedEntities()); buffer.writeBoolean(value.dispensable()); buffer.writeBoolean(value.swappable()); buffer.writeBoolean(value.damageOnHurt());