From 58b593ef994d705382088f427b7568fbfbee2bfe Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Wed, 26 Apr 2023 19:02:49 -0400 Subject: [PATCH] GeyserItemStack: Remove item from equalsAndHashCode --- .../org/geysermc/geyser/inventory/GeyserItemStack.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/inventory/GeyserItemStack.java b/core/src/main/java/org/geysermc/geyser/inventory/GeyserItemStack.java index dee2a8760..b159193e3 100644 --- a/core/src/main/java/org/geysermc/geyser/inventory/GeyserItemStack.java +++ b/core/src/main/java/org/geysermc/geyser/inventory/GeyserItemStack.java @@ -28,6 +28,7 @@ package org.geysermc.geyser.inventory; import com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack; import com.github.steveice10.opennbt.tag.builtin.CompoundTag; import lombok.AccessLevel; +import lombok.EqualsAndHashCode; import lombok.Getter; import org.cloudburstmc.protocol.bedrock.data.inventory.ItemData; import lombok.Data; @@ -48,6 +49,10 @@ public class GeyserItemStack { private CompoundTag nbt; private int netId; + @Getter(AccessLevel.NONE) + @EqualsAndHashCode.Exclude + private Item item; + private GeyserItemStack(int javaId, int amount, CompoundTag nbt) { this(javaId, amount, nbt, 1); } @@ -109,9 +114,6 @@ public class GeyserItemStack { return session.getItemMappings().getMapping(this.javaId); } - @Getter(AccessLevel.NONE) - private Item item; //TODO - public Item asItem() { if (item == null) { return (item = Registries.JAVA_ITEMS.get().get(javaId));