Record Class EndDragonFight.Data

java.lang.Object
java.lang.Record
net.minecraft.world.level.dimension.end.EndDragonFight.Data
Enclosing class:
EndDragonFight

public static record EndDragonFight.Data(boolean needsStateScanning, boolean dragonKilled, boolean previouslyKilled, boolean isRespawning, Optional<UUID> dragonUUID, Optional<BlockPos> exitPortalLocation, Optional<List<Integer>> gateways) extends Record
  • Field Details

    • needsStateScanning

      private final boolean needsStateScanning
      The field for the needsStateScanning record component.
    • dragonKilled

      private final boolean dragonKilled
      The field for the dragonKilled record component.
    • previouslyKilled

      private final boolean previouslyKilled
      The field for the previouslyKilled record component.
    • isRespawning

      private final boolean isRespawning
      The field for the isRespawning record component.
    • dragonUUID

      private final Optional<UUID> dragonUUID
      The field for the dragonUUID record component.
    • exitPortalLocation

      private final Optional<BlockPos> exitPortalLocation
      The field for the exitPortalLocation record component.
    • gateways

      private final Optional<List<Integer>> gateways
      The field for the gateways record component.
    • CODEC

      public static final com.mojang.serialization.Codec<EndDragonFight.Data> CODEC
    • DEFAULT

      public static final EndDragonFight.Data DEFAULT
  • Constructor Details

    • Data

      public Data(boolean needsStateScanning, boolean dragonKilled, boolean previouslyKilled, boolean isRespawning, Optional<UUID> dragonUUID, Optional<BlockPos> exitPortalLocation, Optional<List<Integer>> gateways)
      Creates an instance of a Data record class.
      Parameters:
      needsStateScanning - the value for the needsStateScanning record component
      dragonKilled - the value for the dragonKilled record component
      previouslyKilled - the value for the previouslyKilled record component
      isRespawning - the value for the isRespawning record component
      dragonUUID - the value for the dragonUUID record component
      exitPortalLocation - the value for the exitPortalLocation record component
      gateways - the value for the gateways record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • needsStateScanning

      public boolean needsStateScanning()
      Returns the value of the needsStateScanning record component.
      Returns:
      the value of the needsStateScanning record component
    • dragonKilled

      public boolean dragonKilled()
      Returns the value of the dragonKilled record component.
      Returns:
      the value of the dragonKilled record component
    • previouslyKilled

      public boolean previouslyKilled()
      Returns the value of the previouslyKilled record component.
      Returns:
      the value of the previouslyKilled record component
    • isRespawning

      public boolean isRespawning()
      Returns the value of the isRespawning record component.
      Returns:
      the value of the isRespawning record component
    • dragonUUID

      public Optional<UUID> dragonUUID()
      Returns the value of the dragonUUID record component.
      Returns:
      the value of the dragonUUID record component
    • exitPortalLocation

      public Optional<BlockPos> exitPortalLocation()
      Returns the value of the exitPortalLocation record component.
      Returns:
      the value of the exitPortalLocation record component
    • gateways

      public Optional<List<Integer>> gateways()
      Returns the value of the gateways record component.
      Returns:
      the value of the gateways record component