Class DifferenceIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.minecraftforge.common.crafting.ingredients.AbstractIngredient
net.minecraftforge.common.crafting.ingredients.DifferenceIngredient
Ingredient that matches everything from the first ingredient that is not included in the second ingredient
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.item.crafting.IngredientIngredient.ItemValue, Ingredient.TagValue, Ingredient.Value
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Ingredientstatic final com.mojang.serialization.Codec<DifferenceIngredient>private ItemStack[]private it.unimi.dsi.fastutil.ints.IntListstatic final IIngredientSerializer<DifferenceIngredient>private final IngredientFields inherited from class net.minecraft.world.item.crafting.IngredientCODEC_NONEMPTY, EMPTY, VANILLA_CODEC
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateDifferenceIngredient(Ingredient base, Ingredient subtracted) 
- 
Method SummaryModifier and TypeMethodDescriptiongetItems()it.unimi.dsi.fastutil.ints.IntListprotected voidbooleanisEmpty()booleanisSimple()static DifferenceIngredientof(Ingredient base, Ingredient subtracted) Gets the difference from the two ingredientsbooleanMethods inherited from class net.minecraftforge.common.crafting.ingredients.AbstractIngredientfromNetwork, fromValues, of, of, of, of, ofMethods inherited from class net.minecraft.world.item.crafting.IngredientcheckInvalidation, equals, invalidateAll, isVanilla, markValid, toJson, toNetwork
- 
Field Details- 
base
- 
subtracted
- 
filteredMatchingStacks
- 
packedMatchingStacksprivate it.unimi.dsi.fastutil.ints.IntList packedMatchingStacks
- 
CODEC
- 
SERIALIZER
 
- 
- 
Constructor Details- 
DifferenceIngredient
 
- 
- 
Method Details- 
ofGets the difference from the two ingredients- Parameters:
- base- Ingredient the item must match
- subtracted- Ingredient the item must not match
- Returns:
- Ingredient that matches anything in basethat is not insubtracted
 
- 
test- Specified by:
- testin interface- Predicate<ItemStack>
- Overrides:
- testin class- Ingredient
 
- 
getItems- Overrides:
- getItemsin class- Ingredient
 
- 
isEmptypublic boolean isEmpty()- Overrides:
- isEmptyin class- Ingredient
 
- 
isSimplepublic boolean isSimple()- Specified by:
- isSimplein class- AbstractIngredient
 
- 
invalidateprotected void invalidate()- Overrides:
- invalidatein class- Ingredient
 
- 
getStackingIdspublic it.unimi.dsi.fastutil.ints.IntList getStackingIds()- Overrides:
- getStackingIdsin class- Ingredient
 
- 
serializer- Specified by:
- serializerin class- AbstractIngredient
 
 
-