Record Class DimensionUnlockEffect
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.impl.research.effect.DimensionUnlockEffect
- All Implemented Interfaces:
ResearchEffect
public record DimensionUnlockEffect(net.minecraft.resources.ResourceLocation dimension, net.minecraft.resources.ResourceLocation dimensionIconSprite)
extends Record
implements ResearchEffect
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final ResearchEffectSerializer<DimensionUnlockEffect> -
Constructor Summary
ConstructorsConstructorDescriptionDimensionUnlockEffect(net.minecraft.resources.ResourceLocation dimension, net.minecraft.resources.ResourceLocation dimensionIconSprite) Creates an instance of aDimensionUnlockEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationReturns the value of thedimensionrecord component.net.minecraft.resources.ResourceLocationReturns the value of thedimensionIconSpriterecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.DimensionType> final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()voidonUnlock(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.resources.ResourceKey<Research> research) 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 com.portingdeadmods.researchd.api.research.effects.ResearchEffect
getTranslation
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID -
DEFAULT_SPRITE
public static final net.minecraft.resources.ResourceLocation DEFAULT_SPRITE -
OVERWORLD_SPRITE
public static final net.minecraft.resources.ResourceLocation OVERWORLD_SPRITE -
NETHER_SPRITE
public static final net.minecraft.resources.ResourceLocation NETHER_SPRITE -
END_SPRITE
public static final net.minecraft.resources.ResourceLocation END_SPRITE -
SERIALIZER
-
-
Constructor Details
-
DimensionUnlockEffect
public DimensionUnlockEffect(net.minecraft.resources.ResourceLocation dimension, net.minecraft.resources.ResourceLocation dimensionIconSprite) Creates an instance of aDimensionUnlockEffectrecord class.- Parameters:
dimension- the value for thedimensionrecord componentdimensionIconSprite- the value for thedimensionIconSpriterecord component
-
-
Method Details
-
onUnlock
public void onUnlock(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.resources.ResourceKey<Research> research) - Specified by:
onUnlockin interfaceResearchEffect
-
id
public net.minecraft.resources.ResourceLocation id()- Specified by:
idin interfaceResearchEffect
-
getDimensionType
public net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.DimensionType> getDimensionType() -
getDimension
public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension() -
getSerializer
- Specified by:
getSerializerin interfaceResearchEffect
-
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). -
dimension
public net.minecraft.resources.ResourceLocation dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
dimensionIconSprite
public net.minecraft.resources.ResourceLocation dimensionIconSprite()Returns the value of thedimensionIconSpriterecord component.- Returns:
- the value of the
dimensionIconSpriterecord component
-