Package gollorum.signpost.utils
Datensatzklasse WorldLocation
java.lang.Object
java.lang.Record
gollorum.signpost.utils.WorldLocation
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final com.mojang.serialization.Codec<WorldLocation> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, WorldLocation> -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungWorldLocation(net.minecraft.core.BlockPos blockPos, Either<net.minecraft.world.level.Level, net.minecraft.resources.ResourceLocation> world) Erstellt eine Instanz einer DatensatzklasseWorldLocation. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungnet.minecraft.core.BlockPosblockPos()Gibt den Wert für die DatensatzkomponenteblockPoszurück.booleanGibt an, ob ein anderes Objekt diesem gleich ("equal to") ist.static WorldLocationfrom(net.minecraft.core.BlockPos blockPos, Either<net.minecraft.world.level.Level, net.minecraft.resources.ResourceLocation> world) static WorldLocationfrom(net.minecraft.core.BlockPos blockPos, net.minecraft.resources.ResourceLocation dimensionKeyLocation) static WorldLocationfrom(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.Level world) static Optional<WorldLocation> from(net.minecraft.world.level.block.entity.BlockEntity tile) inthashCode()Gibt einen Hashcodewert für diese Objekt zurück.toString()Gibt eine Zeichenfolgendarstellung dieser Datensatzklasse zurück.Either<net.minecraft.world.level.Level, net.minecraft.resources.ResourceLocation> world()Gibt den Wert für die Datensatzkomponenteworldzurück.
-
Felddetails
-
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 DatensatzklasseWorldLocation.- Parameter:
blockPos- Wert für die DatensatzkomponenteblockPosworld- Wert für die Datensatzkomponenteworld
-
-
Methodendetails
-
from
-
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
-
equals
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 mitObjects::equals(Object,Object). -
hashCode
public int hashCode()Gibt einen Hashcodewert für diese Objekt zurück. Der Wert wird vom Hashcode jeder der Datensatzkomponenten abgeleitet. -
toString
Gibt eine Zeichenfolgendarstellung dieser Datensatzklasse zurück. Die Darstellung enthält den Namen der Klasse, gefolgt vom Namen und Wert jeder der Datensatzkomponenten. -
blockPos
public net.minecraft.core.BlockPos blockPos()Gibt den Wert für die DatensatzkomponenteblockPoszurück.- Gibt zurück:
- Wert der Datensatzkomponente
blockPos
-
world
Gibt den Wert für die Datensatzkomponenteworldzurück.- Gibt zurück:
- Wert der Datensatzkomponente
world
-