Package net.minecraft.recipe
Class Ingredient
java.lang.Object
net.minecraft.recipe.Ingredient
public final class Ingredient extends Object implements Predicate<ItemStack>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
Ingredient.Entry
(package private) static class
Ingredient.StackEntry
(package private) static class
Ingredient.TagEntry
-
Field Summary
Fields Modifier and Type Field Description static Ingredient
EMPTY
private Ingredient.Entry[]
entries
private IntList
ids
private ItemStack[]
matchingStacks
-
Constructor Summary
Constructors Modifier Constructor Description private
Ingredient(Stream<? extends Ingredient.Entry> entries)
-
Method Summary
Modifier and Type Method 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)
IntList
getIds()
ItemStack[]
getMatchingStacksClient()
boolean
isEmpty()
private static Ingredient
ofEntries(Stream<? extends Ingredient.Entry> entries)
static Ingredient
ofItems(ItemConvertible[] items)
static Ingredient
ofStacks(Stream<ItemStack> stacks)
static Ingredient
ofStacks(ItemStack[] stacks)
boolean
test(ItemStack itemStack)
JsonElement
toJson()
void
write(PacketByteBuf buf)
-
Field Details
-
EMPTY
-
entries
-
matchingStacks
-
ids
-
-
Constructor Details
-
Ingredient
-
-
Method Details