Record Class IntersectionIngredient.IntersectionValue
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.crafting.IntersectionIngredient.IntersectionValue
- All Implemented Interfaces:
 Ingredient.Value
- Enclosing class:
 - IntersectionIngredient
 
public static record IntersectionIngredient.IntersectionValue(Ingredient.Value inner, List<Ingredient> other)
extends Record
implements Ingredient.Value
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Ingredient.ValueThe field for theinnerrecord component.private final List<Ingredient>The field for theotherrecord component.Fields inherited from interface net.minecraft.world.item.crafting.Ingredient.Value
CODEC - 
Constructor Summary
ConstructorsConstructorDescriptionIntersectionValue(Ingredient.Value inner, List<Ingredient> other) Creates an instance of aIntersectionValuerecord 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.other()Returns the value of theotherrecord component.final StringtoString()Returns a string representation of this record class. 
- 
Field Details
- 
inner
The field for theinnerrecord component. - 
other
The field for theotherrecord component. 
 - 
 - 
Constructor Details
- 
IntersectionValue
Creates an instance of aIntersectionValuerecord class.- Parameters:
 inner- the value for theinnerrecord componentother- the value for theotherrecord 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 
 - 
other
Returns the value of theotherrecord component.- Returns:
 - the value of the 
otherrecord component 
 
 -