Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
GeyserItemStack: Remove item from equalsAndHashCode
Dieser Commit ist enthalten in:
Ursprung
545087fba4
Commit
58b593ef99
@ -28,6 +28,7 @@ package org.geysermc.geyser.inventory;
|
|||||||
import com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack;
|
import com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack;
|
||||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.inventory.ItemData;
|
import org.cloudburstmc.protocol.bedrock.data.inventory.ItemData;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -48,6 +49,10 @@ public class GeyserItemStack {
|
|||||||
private CompoundTag nbt;
|
private CompoundTag nbt;
|
||||||
private int netId;
|
private int netId;
|
||||||
|
|
||||||
|
@Getter(AccessLevel.NONE)
|
||||||
|
@EqualsAndHashCode.Exclude
|
||||||
|
private Item item;
|
||||||
|
|
||||||
private GeyserItemStack(int javaId, int amount, CompoundTag nbt) {
|
private GeyserItemStack(int javaId, int amount, CompoundTag nbt) {
|
||||||
this(javaId, amount, nbt, 1);
|
this(javaId, amount, nbt, 1);
|
||||||
}
|
}
|
||||||
@ -109,9 +114,6 @@ public class GeyserItemStack {
|
|||||||
return session.getItemMappings().getMapping(this.javaId);
|
return session.getItemMappings().getMapping(this.javaId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter(AccessLevel.NONE)
|
|
||||||
private Item item; //TODO
|
|
||||||
|
|
||||||
public Item asItem() {
|
public Item asItem() {
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return (item = Registries.JAVA_ITEMS.get().get(javaId));
|
return (item = Registries.JAVA_ITEMS.get().get(javaId));
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren