Record Class RecipeUnlockEffectData
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.impl.research.effect.data.RecipeUnlockEffectData
- All Implemented Interfaces:
ResearchEffectData<RecipeUnlockEffect>
public record RecipeUnlockEffectData(Set<net.minecraft.world.item.crafting.RecipeHolder<?>> blockedRecipes)
extends Record
implements ResearchEffectData<RecipeUnlockEffect>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RecipeUnlockEffectData> static final RecipeUnlockEffectData -
Constructor Summary
ConstructorsConstructorDescriptionRecipeUnlockEffectData(Set<net.minecraft.world.item.crafting.RecipeHolder<?>> blockedRecipes) Creates an instance of aRecipeUnlockEffectDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(RecipeUnlockEffect recipe, net.minecraft.world.level.Level level) Set<net.minecraft.world.item.crafting.RecipeHolder<?>> Returns the value of theblockedRecipesrecord component.final booleanIndicates whether some other object is "equal to" this one.Set<net.minecraft.world.item.crafting.RecipeHolder<?>> getAll()getDefault(net.minecraft.world.level.Level level) Returns a new RecipePredicateData with all the blocked recipes from researchPacks.final inthashCode()Returns a hash code value for this object.remove(RecipeUnlockEffect recipe, net.minecraft.world.level.Level level) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
CODEC
-
-
Constructor Details
-
RecipeUnlockEffectData
public RecipeUnlockEffectData(Set<net.minecraft.world.item.crafting.RecipeHolder<?>> blockedRecipes) Creates an instance of aRecipeUnlockEffectDatarecord class.- Parameters:
blockedRecipes- the value for theblockedRecipesrecord component
-
-
Method Details
-
add
- Specified by:
addin interfaceResearchEffectData<RecipeUnlockEffect>
-
remove
public RecipeUnlockEffectData remove(RecipeUnlockEffect recipe, net.minecraft.world.level.Level level) - Specified by:
removein interfaceResearchEffectData<RecipeUnlockEffect>
-
getAll
- Specified by:
getAllin interfaceResearchEffectData<RecipeUnlockEffect>
-
getDefault
Returns a new RecipePredicateData with all the blocked recipes from researchPacks.- Specified by:
getDefaultin interfaceResearchEffectData<RecipeUnlockEffect>- Parameters:
level-
-
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). -
blockedRecipes
Returns the value of theblockedRecipesrecord component.- Returns:
- the value of the
blockedRecipesrecord component
-