Class Items
java.lang.Object
fr.robie.machineengine.api.item.Items
Minecraft items as resources (ARCHITECTURE.md §23.4). There is one resource type,
ITEM;
the concrete item is its DATA component, so items added after MachineEngine started
(CraftEngine items load later) work too. Amounts are item counts.
MachineEngine registers these itself. The Paper module converts to and from ItemStacks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResourceCategorystatic final ResourceComponentType<ItemData> static final StorageCodec<ItemData> static final ResourceType -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ResourcePredicateanyItem()Matches any item.static @NotNull ResourcePredicateinTag(@NotNull net.kyori.adventure.key.Key tag) Matches items in the item tagtag(e.g.static @NotNull ResourcePredicateofItem(@NotNull net.kyori.adventure.key.Key itemId) Matches items with this id, whatever their other data (name, enchantments …).static @NotNull ResourceVariant
-
Field Details
-
CATEGORY
-
DATA_CODEC
-
DATA
-
ITEM
-
-
Method Details
-
variant
-
ofItem
@NotNull public static @NotNull ResourcePredicate ofItem(@NotNull @NotNull net.kyori.adventure.key.Key itemId) Matches items with this id, whatever their other data (name, enchantments …). -
inTag
@NotNull public static @NotNull ResourcePredicate inTag(@NotNull @NotNull net.kyori.adventure.key.Key tag) -
anyItem
Matches any item.
-