Modifier and Type | Class and Description |
---|---|
(package private) static interface |
Ingredient.Entry |
(package private) static class |
Ingredient.StackEntry |
(package private) static class |
Ingredient.TagEntry |
Modifier and Type | Field and Description |
---|---|
static Ingredient |
EMPTY |
private Ingredient.Entry[] |
entries |
private it.unimi.dsi.fastutil.ints.IntList |
ids |
private ItemStack[] |
matchingStacks |
Modifier | Constructor and Description |
---|---|
private |
Ingredient(Stream<? extends Ingredient.Entry> entries) |
Modifier and Type | Method and Description |
---|---|
private void |
cacheMatchingStacks() |
private static Ingredient.Entry |
entryFromJson(JsonObject json) |
static Ingredient |
fromJson(JsonElement json) |
static Ingredient |
fromPacket(PacketByteBuf buf) |
static Ingredient |
fromTag(Tag<Item> tag) |
it.unimi.dsi.fastutil.ints.IntList |
getIds() |
ItemStack[] |
getMatchingStacksClient() |
boolean |
isEmpty() |
private static Ingredient |
ofEntries(Stream<? extends Ingredient.Entry> entries) |
static Ingredient |
ofItems(ItemConvertible[] items) |
static Ingredient |
ofStacks(ItemStack[] stacks) |
static Ingredient |
ofStacks(Stream<ItemStack> stacks) |
boolean |
test(ItemStack itemStack) |
JsonElement |
toJson() |
void |
write(PacketByteBuf buf) |
public static final Ingredient EMPTY
private final Ingredient.Entry[] entries
private ItemStack[] matchingStacks
private it.unimi.dsi.fastutil.ints.IntList ids
private Ingredient(Stream<? extends Ingredient.Entry> entries)
@Environment(value=CLIENT) public ItemStack[] getMatchingStacksClient()
private void cacheMatchingStacks()
public it.unimi.dsi.fastutil.ints.IntList getIds()
public void write(PacketByteBuf buf)
public JsonElement toJson()
public boolean isEmpty()
private static Ingredient ofEntries(Stream<? extends Ingredient.Entry> entries)
public static Ingredient ofItems(ItemConvertible[] items)
@Environment(value=CLIENT) public static Ingredient ofStacks(ItemStack[] stacks)
public static Ingredient ofStacks(Stream<ItemStack> stacks)
public static Ingredient fromTag(Tag<Item> tag)
public static Ingredient fromPacket(PacketByteBuf buf)
public static Ingredient fromJson(@Nullable JsonElement json)
private static Ingredient.Entry entryFromJson(JsonObject json)