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(com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceLocation> blockedRecipes)
extends Record
implements ResearchEffectData<RecipeUnlockEffect>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RecipeUnlockEffectData> static final RecipeUnlockEffectDatastatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, RecipeUnlockEffectData> -
Constructor Summary
ConstructorsConstructorDescriptionRecipeUnlockEffectData(com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceLocation> blockedRecipes) Creates an instance of aRecipeUnlockEffectDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(RecipeUnlockEffect recipe, net.minecraft.world.level.Level level) com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceLocation> Returns the value of theblockedRecipesrecord component.booleancontains(net.minecraft.resources.ResourceLocation recipeId) booleancontains(net.minecraft.world.item.crafting.RecipeHolder<?> holder) final booleanIndicates whether some other object is "equal to" this one.com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceLocation> getAll()getDefault(net.minecraft.world.level.Level level) This method should return a 'default' instance of the Data class As a default, it should hold all the effects as if they weren't researched yet.final inthashCode()Returns a hash code value for this object.booleanisEmpty()remove(RecipeUnlockEffect recipe, net.minecraft.world.level.Level level) com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.world.item.crafting.RecipeHolder<?>> resolve(net.minecraft.world.level.Level level) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,RecipeUnlockEffectData> STREAM_CODEC
-
-
Constructor Details
-
RecipeUnlockEffectData
public RecipeUnlockEffectData(com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceLocation> 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>
-
contains
public boolean contains(net.minecraft.resources.ResourceLocation recipeId) -
contains
public boolean contains(net.minecraft.world.item.crafting.RecipeHolder<?> holder) -
isEmpty
public boolean isEmpty() -
resolve
public com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.world.item.crafting.RecipeHolder<?>> resolve(net.minecraft.world.level.Level level) -
getAll
public com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceLocation> getAll()- Specified by:
getAllin interfaceResearchEffectData<RecipeUnlockEffect>
-
getDefault
Description copied from interface:ResearchEffectDataThis method should return a 'default' instance of the Data class As a default, it should hold all the effects as if they weren't researched yet.- Specified by:
getDefaultin interfaceResearchEffectData<RecipeUnlockEffect>
-
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
public com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceLocation> blockedRecipes()Returns the value of theblockedRecipesrecord component.- Returns:
- the value of the
blockedRecipesrecord component
-