Record Class JsonRecipeOutput
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.resources.JsonRecipeOutput
- All Implemented Interfaces:
net.minecraft.data.recipes.RecipeOutput,net.neoforged.neoforge.common.extensions.IRecipeOutputExtension
-
Constructor Summary
ConstructorsConstructorDescriptionJsonRecipeOutput(Map<net.minecraft.resources.ResourceLocation, net.minecraft.world.item.crafting.Recipe<?>> recipes) Creates an instance of aJsonRecipeOutputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Recipe<?> recipe, @Nullable net.minecraft.advancements.AdvancementHolder advancement, net.neoforged.neoforge.common.conditions.ICondition... conditions) net.minecraft.advancements.Advancement.Builderfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Map<net.minecraft.resources.ResourceLocation, net.minecraft.world.item.crafting.Recipe<?>> recipes()Returns the value of therecipesrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.IRecipeOutputExtension
withConditionsMethods inherited from interface net.minecraft.data.recipes.RecipeOutput
accept
-
Constructor Details
-
JsonRecipeOutput
public JsonRecipeOutput() -
JsonRecipeOutput
public JsonRecipeOutput(Map<net.minecraft.resources.ResourceLocation, net.minecraft.world.item.crafting.Recipe<?>> recipes) Creates an instance of aJsonRecipeOutputrecord class.- Parameters:
recipes- the value for therecipesrecord component
-
-
Method Details
-
advancement
public net.minecraft.advancements.Advancement.Builder advancement()- Specified by:
advancementin interfacenet.minecraft.data.recipes.RecipeOutput
-
accept
public void accept(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Recipe<?> recipe, @Nullable @Nullable net.minecraft.advancements.AdvancementHolder advancement, net.neoforged.neoforge.common.conditions.ICondition... conditions) - Specified by:
acceptin interfacenet.neoforged.neoforge.common.extensions.IRecipeOutputExtension
-
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). -
recipes
public Map<net.minecraft.resources.ResourceLocation,net.minecraft.world.item.crafting.Recipe<?>> recipes()Returns the value of therecipesrecord component.- Returns:
- the value of the
recipesrecord component
-