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

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceLocation
     
    static final net.minecraft.resources.ResourceLocation
     
    static final net.minecraft.resources.ResourceLocation
     
    static final net.minecraft.resources.ResourceLocation
     
    static final net.minecraft.resources.ResourceLocation
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DimensionUnlockEffect(net.minecraft.resources.ResourceLocation dimension, net.minecraft.resources.ResourceLocation dimensionIconSprite)
    Creates an instance of a DimensionUnlockEffect record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.resources.ResourceLocation
    Returns the value of the dimension record component.
    net.minecraft.resources.ResourceLocation
    Returns the value of the dimensionIconSprite record component.
    final boolean
    Indicates 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 int
    Returns a hash code value for this object.
    net.minecraft.resources.ResourceLocation
    id()
     
    void
    onUnlock(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.resources.ResourceKey<Research> research)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods 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

      public static final ResearchEffectSerializer<DimensionUnlockEffect> SERIALIZER
  • Constructor Details

    • DimensionUnlockEffect

      public DimensionUnlockEffect(net.minecraft.resources.ResourceLocation dimension, net.minecraft.resources.ResourceLocation dimensionIconSprite)
      Creates an instance of a DimensionUnlockEffect record class.
      Parameters:
      dimension - the value for the dimension record component
      dimensionIconSprite - the value for the dimensionIconSprite record 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:
      onUnlock in interface ResearchEffect
    • id

      public net.minecraft.resources.ResourceLocation id()
      Specified by:
      id in interface ResearchEffect
    • 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

      public ResearchEffectSerializer<?> getSerializer()
      Specified by:
      getSerializer in interface ResearchEffect
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • dimension

      public net.minecraft.resources.ResourceLocation dimension()
      Returns the value of the dimension record component.
      Returns:
      the value of the dimension record component
    • dimensionIconSprite

      public net.minecraft.resources.ResourceLocation dimensionIconSprite()
      Returns the value of the dimensionIconSprite record component.
      Returns:
      the value of the dimensionIconSprite record component