Class NonVanillaItem

java.lang.Object
org.geysermc.geyser.item.type.Item
org.geysermc.geyser.item.type.NonVanillaItem

public class NonVanillaItem extends Item
  • Constructor Details

  • Method Details

    • gatherComponents

      public @NonNull @UnmodifiableView org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents gatherComponents(@Nullable ComponentCache componentCache, @Nullable org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents others)
      Description copied from class: Item
      Returns an unmodifiable DataComponents view containing known data components. Optionally, additional components can be provided to replace (or add to) the items' base components. To add data components, use GeyserItemStack.getOrCreateComponents().
      Overrides:
      gatherComponents in class Item
    • getComponent

      public <T> @Nullable T getComponent(@Nullable ComponentCache componentCache, @NonNull org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<T> type)
      Description copied from class: Item
      Returns this items value (or null) for a specific DataComponentType. Prefer using GeyserItemStack.getComponent(DataComponentType) to also query additional components that would override the default ones.
      Overrides:
      getComponent in class Item
    • resolvableComponents

      public @NonNull List<ResolvableComponent<?>> resolvableComponents()