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 Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.crafting.Ingredient
Ingredient.ItemValue, Ingredient.TagValue, Ingredient.Value - 
Field Summary
FieldsModifier 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.Ingredient
CODEC_NONEMPTY, EMPTY, VANILLA_CODEC - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDifferenceIngredient(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 ingredientsbooleanMethods inherited from class net.minecraftforge.common.crafting.ingredients.AbstractIngredient
fromNetwork, fromValues, of, of, of, of, ofMethods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, equals, invalidateAll, isVanilla, markValid, toJson, toNetwork 
- 
Field Details
- 
base
 - 
subtracted
 - 
filteredMatchingStacks
 - 
packedMatchingStacks
private it.unimi.dsi.fastutil.ints.IntList packedMatchingStacks - 
CODEC
 - 
SERIALIZER
 
 - 
 - 
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 matches anything in 
basethat 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
 - 
serializer
- Specified by:
 serializerin classAbstractIngredient
 
 -