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 theentries
record component. -
Constructor Summary
ConstructorsConstructorDescriptionSingleInputSet
(List<SelectableRecipe.SingleInputEntry<T>> entries) Creates an instance of aSingleInputSet
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptsInput
(ItemStack p_379311_) static <T extends Recipe<?>>
SelectableRecipe.SingleInputSet<T> empty()
entries()
Returns the value of theentries
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isEmpty()
static <T extends Recipe<?>>
StreamCodec<RegistryFriendlyByteBuf, SelectableRecipe.SingleInputSet<T>> selectByInput
(ItemStack p_379956_) int
size()
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
entries
The field for theentries
record component.
-
-
Constructor Details
-
SingleInputSet
Creates an instance of aSingleInputSet
record class.- Parameters:
entries
- the value for theentries
record 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 theentries
record component.- Returns:
- the value of the
entries
record component
-