Record Class KubeRecipeFactory
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.recipe.schema.KubeRecipeFactory
public record KubeRecipeFactory(net.minecraft.resources.ResourceLocation id, dev.latvian.mods.rhino.type.TypeInfo recipeType, Supplier<? extends KubeRecipe> factory)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKubeRecipeFactory(net.minecraft.resources.ResourceLocation id, dev.latvian.mods.rhino.type.TypeInfo recipeType, Supplier<? extends KubeRecipe> factory) Creates an instance of aKubeRecipeFactoryrecord class.KubeRecipeFactory(net.minecraft.resources.ResourceLocation id, Class<?> recipeType, Supplier<? extends KubeRecipe> factory) -
Method Summary
Modifier and TypeMethodDescriptioncreate(RecipeTypeFunction type, SourceLine sourceLine, boolean save) final booleanIndicates whether some other object is "equal to" this one.Supplier<? extends KubeRecipe> factory()Returns the value of thefactoryrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.dev.latvian.mods.rhino.type.TypeInfoReturns the value of therecipeTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
KubeRecipeFactory
public KubeRecipeFactory(net.minecraft.resources.ResourceLocation id, Class<?> recipeType, Supplier<? extends KubeRecipe> factory) -
KubeRecipeFactory
public KubeRecipeFactory(net.minecraft.resources.ResourceLocation id, dev.latvian.mods.rhino.type.TypeInfo recipeType, Supplier<? extends KubeRecipe> factory) Creates an instance of aKubeRecipeFactoryrecord class.- Parameters:
id- the value for theidrecord componentrecipeType- the value for therecipeTyperecord componentfactory- the value for thefactoryrecord component
-
-
Method Details
-
create
-
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). -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
recipeType
public dev.latvian.mods.rhino.type.TypeInfo recipeType()Returns the value of therecipeTyperecord component.- Returns:
- the value of the
recipeTyperecord component
-
factory
Returns the value of thefactoryrecord component.- Returns:
- the value of the
factoryrecord component
-