Record Class DimensionUnlockEffectData
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.impl.research.effect.data.DimensionUnlockEffectData
- All Implemented Interfaces:
ResearchEffectData<DimensionUnlockEffect>
public record DimensionUnlockEffectData(com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.DimensionType>> blockedDimensions)
extends Record
implements ResearchEffectData<DimensionUnlockEffect>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DimensionUnlockEffectData> static final DimensionUnlockEffectDatastatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, DimensionUnlockEffectData> -
Constructor Summary
ConstructorsConstructorDescriptionDimensionUnlockEffectData(com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.DimensionType>> blockedDimensions) Creates an instance of aDimensionUnlockEffectDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(DimensionUnlockEffect predicate, net.minecraft.world.level.Level level) com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.DimensionType>> Returns the value of theblockedDimensionsrecord component.final booleanIndicates whether some other object is "equal to" this one.com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.DimensionType>> 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.remove(DimensionUnlockEffect predicate, 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,DimensionUnlockEffectData> STREAM_CODEC
-
-
Constructor Details
-
DimensionUnlockEffectData
public DimensionUnlockEffectData(com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.DimensionType>> blockedDimensions) Creates an instance of aDimensionUnlockEffectDatarecord class.- Parameters:
blockedDimensions- the value for theblockedDimensionsrecord component
-
-
Method Details
-
add
public DimensionUnlockEffectData add(DimensionUnlockEffect predicate, net.minecraft.world.level.Level level) - Specified by:
addin interfaceResearchEffectData<DimensionUnlockEffect>
-
remove
public DimensionUnlockEffectData remove(DimensionUnlockEffect predicate, net.minecraft.world.level.Level level) - Specified by:
removein interfaceResearchEffectData<DimensionUnlockEffect>
-
getAll
public com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.DimensionType>> getAll()- Specified by:
getAllin interfaceResearchEffectData<DimensionUnlockEffect>
-
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<DimensionUnlockEffect>
-
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). -
blockedDimensions
public com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.DimensionType>> blockedDimensions()Returns the value of theblockedDimensionsrecord component.- Returns:
- the value of the
blockedDimensionsrecord component
-