Record Class DifferenceIngredient.SubtractingValue
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.crafting.DifferenceIngredient.SubtractingValue
- All Implemented Interfaces:
 Ingredient.Value
- Enclosing class:
 - DifferenceIngredient
 
private static record DifferenceIngredient.SubtractingValue(Ingredient.Value inner, Ingredient subtracted)
extends Record
implements Ingredient.Value
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Ingredient.ValueThe field for theinnerrecord component.private final IngredientThe field for thesubtractedrecord component.Fields inherited from interface net.minecraft.world.item.crafting.Ingredient.Value
CODEC - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSubtractingValue(Ingredient.Value inner, Ingredient subtracted) Creates an instance of aSubtractingValuerecord class. - 
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getItems()final inthashCode()Returns a hash code value for this object.inner()Returns the value of theinnerrecord component.Returns the value of thesubtractedrecord component.final StringtoString()Returns a string representation of this record class. 
- 
Field Details
- 
inner
The field for theinnerrecord component. - 
subtracted
The field for thesubtractedrecord component. 
 - 
 - 
Constructor Details
- 
SubtractingValue
Creates an instance of aSubtractingValuerecord class.- Parameters:
 inner- the value for theinnerrecord componentsubtracted- the value for thesubtractedrecord component
 
 - 
 - 
Method Details
- 
getItems
- Specified by:
 getItemsin interfaceIngredient.Value
 - 
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. - 
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. - 
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). - 
inner
Returns the value of theinnerrecord component.- Returns:
 - the value of the 
innerrecord component 
 - 
subtracted
Returns the value of thesubtractedrecord component.- Returns:
 - the value of the 
subtractedrecord component 
 
 -