Record Class SelectableRecipe.SingleInputSet<T extends Recipe<?>>
java.lang.Object
java.lang.Record
net.minecraft.world.item.crafting.SelectableRecipe.SingleInputSet<T>
- Enclosing class:
SelectableRecipe<T extends Recipe<?>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<SelectableRecipe.SingleInputEntry<T>> The field for theentriesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSingleInputSet(List<SelectableRecipe.SingleInputEntry<T>> entries) Creates an instance of aSingleInputSetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsInput(ItemStack pStack) static <T extends Recipe<?>>
SelectableRecipe.SingleInputSet<T> empty()entries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()static <T extends Recipe<?>>
StreamCodec<RegistryFriendlyByteBuf, SelectableRecipe.SingleInputSet<T>> selectByInput(ItemStack pStack) intsize()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
entries
The field for theentriesrecord component.
-
-
Constructor Details
-
SingleInputSet
Creates an instance of aSingleInputSetrecord class.- Parameters:
entries- the value for theentriesrecord component
-
-
Method Details
-
empty
-
noRecipeCodec
public static <T extends Recipe<?>> StreamCodec<RegistryFriendlyByteBuf,SelectableRecipe.SingleInputSet<T>> noRecipeCodec() -
acceptsInput
-
selectByInput
-
isEmpty
public boolean isEmpty() -
size
public int size() -
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). -
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-