Datensatzklasse WorldLocation

java.lang.Object
java.lang.Record
gollorum.signpost.utils.WorldLocation

public record WorldLocation(net.minecraft.core.BlockPos blockPos, Either<net.minecraft.world.level.Level,net.minecraft.resources.ResourceLocation> world) extends Record
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final com.mojang.serialization.Codec<WorldLocation>
     
    static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,WorldLocation>
     
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    WorldLocation(net.minecraft.core.BlockPos blockPos, Either<net.minecraft.world.level.Level,net.minecraft.resources.ResourceLocation> world)
    Erstellt eine Instanz einer Datensatzklasse WorldLocation.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    net.minecraft.core.BlockPos
    Gibt den Wert für die Datensatzkomponente blockPos zurück.
    boolean
    Gibt an, ob ein anderes Objekt diesem gleich ("equal to") ist.
    from(net.minecraft.core.BlockPos blockPos, Either<net.minecraft.world.level.Level,net.minecraft.resources.ResourceLocation> world)
     
    from(net.minecraft.core.BlockPos blockPos, net.minecraft.resources.ResourceLocation dimensionKeyLocation)
     
    from(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.Level world)
     
    from(net.minecraft.world.level.block.entity.BlockEntity tile)
     
    int
    Gibt einen Hashcodewert für diese Objekt zurück.
    Gibt eine Zeichenfolgendarstellung dieser Datensatzklasse zurück.
     
    Either<net.minecraft.world.level.Level,net.minecraft.resources.ResourceLocation>
    Gibt den Wert für die Datensatzkomponente world zurück.

    Von Klasse geerbte Methoden java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Felddetails

    • CODEC

      public static final com.mojang.serialization.Codec<WorldLocation> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,WorldLocation> STREAM_CODEC
  • Konstruktordetails

    • WorldLocation

      public WorldLocation(net.minecraft.core.BlockPos blockPos, Either<net.minecraft.world.level.Level,net.minecraft.resources.ResourceLocation> world)
      Erstellt eine Instanz einer Datensatzklasse WorldLocation.
      Parameter:
      blockPos - Wert für die Datensatzkomponente blockPos
      world - Wert für die Datensatzkomponente world
  • Methodendetails

    • from

      public static Optional<WorldLocation> from(net.minecraft.world.level.block.entity.BlockEntity tile)
    • from

      public static WorldLocation from(net.minecraft.core.BlockPos blockPos, Either<net.minecraft.world.level.Level,net.minecraft.resources.ResourceLocation> world)
    • from

      public static WorldLocation from(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.Level world)
    • from

      public static WorldLocation from(net.minecraft.core.BlockPos blockPos, net.minecraft.resources.ResourceLocation dimensionKeyLocation)
    • withoutExplicitLevel

      public WorldLocation withoutExplicitLevel()
    • equals

      public boolean equals(Object o)
      Gibt an, ob ein anderes Objekt diesem gleich ("equal to") ist. Die Objekte sind gleich, wenn das andere Objekt der gleichen Klasse angehört und alle Datensatzkomponenten gleich sind. Alle Komponenten in dieser Datensatzklasse werden verglichen mit Objects::equals(Object,Object).
      Angegeben von:
      equals in Klasse Record
      Parameter:
      o - das Objekt, mit dem verglichen wird
      Gibt zurück:
      true, wenn dieses Objekt gleich dem Argument o ist, andernfalls false.
    • hashCode

      public int hashCode()
      Gibt einen Hashcodewert für diese Objekt zurück. Der Wert wird vom Hashcode jeder der Datensatzkomponenten abgeleitet.
      Angegeben von:
      hashCode in Klasse Record
      Gibt zurück:
      ein Hashcodewert für dieses Objekt
    • toString

      public String toString()
      Gibt eine Zeichenfolgendarstellung dieser Datensatzklasse zurück. Die Darstellung enthält den Namen der Klasse, gefolgt vom Namen und Wert jeder der Datensatzkomponenten.
      Angegeben von:
      toString in Klasse Record
      Gibt zurück:
      eine Zeichenfolgendarstellung dieses Objekts
    • blockPos

      public net.minecraft.core.BlockPos blockPos()
      Gibt den Wert für die Datensatzkomponente blockPos zurück.
      Gibt zurück:
      Wert der Datensatzkomponente blockPos
    • world

      public Either<net.minecraft.world.level.Level,net.minecraft.resources.ResourceLocation> world()
      Gibt den Wert für die Datensatzkomponente world zurück.
      Gibt zurück:
      Wert der Datensatzkomponente world