Package org.geysermc.geyser.inventory
Class GeyserItemStack
java.lang.Object
org.geysermc.geyser.inventory.GeyserItemStack
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int add) asItem()protected booleancopy()copy(int newAmount) booleanstatic @NonNull GeyserItemStackfrom(@Nullable org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack itemStack) int<T> @Nullable TgetComponent(@NonNull org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<T> type) <T extends Boolean>
booleangetComponent(@NonNull org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<T> type, boolean def) <T extends Integer>
intgetComponent(@NonNull org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<T> type, int def) @Nullable org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentsorg.cloudburstmc.protocol.bedrock.data.inventory.ItemDatagetItemData(GeyserSession session) org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack@Nullable org.geysermc.mcprotocollib.protocol.data.game.item.ItemStackgetItemStack(int newAmount) intgetMapping(GeyserSession session) intgetNetId()@NonNull org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentsinthashCode()booleanisEmpty()static @NonNull GeyserItemStackof(int javaId, int amount) static @NonNull GeyserItemStackof(int javaId, int amount, org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components) voidsetAmount(int amount) voidsetComponents(org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components) voidsetNetId(int netId) voidsub(int sub) toString()
-
Field Details
-
EMPTY
-
-
Method Details
-
of
-
of
public static @NonNull GeyserItemStack of(int javaId, int amount, org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components) -
from
public static @NonNull GeyserItemStack from(@Nullable org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack itemStack) -
getJavaId
public int getJavaId() -
getAmount
public int getAmount() -
getComponents
public @Nullable org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents getComponents() -
getOrCreateComponents
public @NonNull org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents getOrCreateComponents() -
getComponent
public <T> @Nullable T getComponent(@NonNull org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<T> type) -
getComponent
public <T extends Boolean> boolean getComponent(@NonNull org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<T> type, boolean def) -
getComponent
public <T extends Integer> int getComponent(@NonNull org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<T> type, int def) -
getNetId
public int getNetId() -
add
public void add(int add) -
sub
public void sub(int sub) -
getItemStack
public org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack getItemStack() -
getItemStack
public @Nullable org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack getItemStack(int newAmount) -
getItemData
-
getMapping
-
asItem
-
isEmpty
public boolean isEmpty() -
copy
-
copy
-
setAmount
public void setAmount(int amount) -
setComponents
public void setComponents(org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components) -
setNetId
public void setNetId(int netId) -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-