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.MapCodec<RecipeUnlockEffectData> static final RecipeUnlockEffectDatastatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, RecipeUnlockEffectData> static final ResearchEffectDataType<RecipeUnlockEffectData> -
Constructor Summary
ConstructorsConstructorDescriptionRecipeUnlockEffectData(com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceLocation> blockedRecipes) Creates an instance of aRecipeUnlockEffectDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(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()final inthashCode()Returns a hash code value for this object.booleanisEmpty()voidremove(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.type()
-
Field Details
-
EMPTY
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,RecipeUnlockEffectData> STREAM_CODEC -
TYPE
-
-
Constructor Details
-
RecipeUnlockEffectData
public RecipeUnlockEffectData() -
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
- 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>
-
type
- Specified by:
typein 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
-