diff --git a/src/main/java/org/spongepowered/common/entity/SpongeEntityArchetype.java b/src/main/java/org/spongepowered/common/entity/SpongeEntityArchetype.java index 8b6e6d98173..0b788c0d528 100644 --- a/src/main/java/org/spongepowered/common/entity/SpongeEntityArchetype.java +++ b/src/main/java/org/spongepowered/common/entity/SpongeEntityArchetype.java @@ -172,7 +172,7 @@ public EntitySnapshot toSnapshot(final ServerLocation location) { final CompoundTag newCompound = this.compound.copy(); final Vector3d pos = location.position(); newCompound.put(Constants.Entity.ENTITY_POSITION, Constants.NBT.newDoubleNBTList(pos.x(), pos.y(), pos.z())); - newCompound.putString(Constants.Sponge.World.WORLD_KEY, location.worldKey().formatted()); + newCompound.putString(Constants.Sponge.World.DIMENSION, location.worldKey().formatted()); builder.compound = newCompound; builder.worldKey = location.world().properties().key(); builder.position = pos; diff --git a/src/main/java/org/spongepowered/common/entity/player/SpongeUserData.java b/src/main/java/org/spongepowered/common/entity/player/SpongeUserData.java index 6fe79650820..80609e55edc 100644 --- a/src/main/java/org/spongepowered/common/entity/player/SpongeUserData.java +++ b/src/main/java/org/spongepowered/common/entity/player/SpongeUserData.java @@ -220,8 +220,8 @@ public void readCompound(final CompoundTag compound) { this.reset(); this.compound = compound; - if (!compound.contains(Constants.Sponge.World.WORLD_KEY)) { - this.worldKey = ResourceKey.resolve(compound.getString(Constants.Sponge.World.WORLD_KEY)); + if (!compound.contains(Constants.Sponge.World.DIMENSION)) { + this.worldKey = ResourceKey.resolve(compound.getString(Constants.Sponge.World.DIMENSION)); } final ListTag position = compound.getList(Constants.Entity.ENTITY_POSITION, Constants.NBT.TAG_DOUBLE); final ListTag rotation = compound.getList(Constants.Entity.ENTITY_ROTATION, Constants.NBT.TAG_FLOAT); @@ -238,7 +238,7 @@ public void readCompound(final CompoundTag compound) { public void writeCompound(final CompoundTag compound) { - compound.putString(Constants.Sponge.World.WORLD_KEY, this.worldKey.formatted()); + compound.putString(Constants.Sponge.World.DIMENSION, this.worldKey.formatted()); this.loadInventory(); this.loadEnderInventory(); diff --git a/src/main/java/org/spongepowered/common/util/Constants.java b/src/main/java/org/spongepowered/common/util/Constants.java index 0982d657e62..f82d15b4e47 100644 --- a/src/main/java/org/spongepowered/common/util/Constants.java +++ b/src/main/java/org/spongepowered/common/util/Constants.java @@ -287,7 +287,7 @@ public static final class World { public static final String LEVEL_SPONGE_DAT_NEW = org.spongepowered.common.util.Constants.Sponge.World.LEVEL_SPONGE_DAT + "_new"; public static final String UNIQUE_ID = "UUID"; public static final String DIMENSIONS_DIRECTORY = "dimensions"; - public static final String WORLD_KEY = "WorldKey"; + public static final String DIMENSION = "Dimension"; } public static final class Schematic {