mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
GeyserItemStack: Remove item from equalsAndHashCode
This commit is contained in:
parent
545087fba4
commit
58b593ef99
1 changed files with 5 additions and 3 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue