Class GeyserItemStack

java.lang.Object
org.geysermc.geyser.inventory.GeyserItemStack

public class GeyserItemStack extends Object
  • Field Details

  • Method Details

    • of

      public static @NonNull GeyserItemStack of(int javaId, int amount)
    • of

      public static @NonNull GeyserItemStack of(int javaId, int amount, @Nullable 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)
    • from

      public static @NonNull GeyserItemStack from(@NonNull org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay slotDisplay)
    • 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

      public org.cloudburstmc.protocol.bedrock.data.inventory.ItemData getItemData(GeyserSession session)
    • getMapping

      public ItemMapping getMapping(GeyserSession session)
    • asSlotDisplay

      public org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay asSlotDisplay()
    • asItem

      public Item asItem()
    • isEmpty

      public boolean isEmpty()
    • copy

      public GeyserItemStack copy()
    • copy

      public GeyserItemStack copy(int newAmount)
    • 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object