Class DifferenceIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.minecraftforge.common.crafting.AbstractIngredient
net.minecraftforge.common.crafting.DifferenceIngredient
Ingredient that matches everything from the first ingredient that is not included in the second ingredient
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.item.crafting.Ingredient
Ingredient.ItemValue, Ingredient.TagValue, Ingredient.Value -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Ingredientprivate ItemStack[]private it.unimi.dsi.fastutil.ints.IntListprivate final IngredientFields inherited from class net.minecraft.world.item.crafting.Ingredient
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDifferenceIngredient(Ingredient base, Ingredient subtracted) -
Method Summary
Modifier and TypeMethodDescriptiongetItems()it.unimi.dsi.fastutil.ints.IntListprotected voidbooleanisEmpty()booleanisSimple()static DifferenceIngredientof(Ingredient base, Ingredient subtracted) Gets the difference from the two ingredientsbooleancom.google.gson.JsonElementtoJson()Methods inherited from class net.minecraftforge.common.crafting.AbstractIngredient
fromJson, fromNetwork, fromValues, of, of, of, of, ofMethods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, invalidateAll, isVanilla, markValid, merge, toNetwork, valueFromJson
-
Field Details
-
base
-
subtracted
-
filteredMatchingStacks
-
packedMatchingStacks
private it.unimi.dsi.fastutil.ints.IntList packedMatchingStacks
-
-
Constructor Details
-
DifferenceIngredient
-
-
Method Details
-
of
Gets the difference from the two ingredients- Parameters:
base- Ingredient the item must matchsubtracted- Ingredient the item must not match- Returns:
- Ingredient that
baseanything in base that is not insubtracted
-
test
- Specified by:
testin interfacePredicate<ItemStack>- Overrides:
testin classIngredient
-
getItems
- Overrides:
getItemsin classIngredient
-
isEmpty
public boolean isEmpty()- Overrides:
isEmptyin classIngredient
-
isSimple
public boolean isSimple()- Specified by:
isSimplein classAbstractIngredient
-
invalidate
protected void invalidate()- Overrides:
invalidatein classIngredient
-
getStackingIds
public it.unimi.dsi.fastutil.ints.IntList getStackingIds()- Overrides:
getStackingIdsin classIngredient
-
toJson
public com.google.gson.JsonElement toJson()- Specified by:
toJsonin classAbstractIngredient
-
getSerializer
- Specified by:
getSerializerin classAbstractIngredient
-