readd bukkit extra data to entity tags

This commit is contained in:
Lulu13022002
2024-12-16 18:07:41 +01:00
parent 48be22a63e
commit 9e8a2de45b
8 changed files with 38 additions and 42 deletions

View File

@@ -5,7 +5,7 @@
private boolean disconnected;
private int requestedViewDistance = 2;
- public String language = "en_us";
+ public String language = null; // CraftBukkit - default // Paper - default to null
+ public String language = null; // Paper - default to null
+ public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
@Nullable
private Vec3 startingToFallPosition;
@@ -106,7 +106,7 @@
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
- this.moveTo(this.adjustSpawnLocation(level, level.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F);
- this.updateOptions(clientInformation);
+ // this.moveTo(this.adjustSpawnLocation(level, level.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn
+ // this.moveTo(this.adjustSpawnLocation(level, level.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn
+ this.updateOptionsNoEvents(clientInformation); // Paper - don't call options events on login
this.object = null;
+
@@ -196,6 +196,14 @@
if (compound.contains("SpawnX", 99) && compound.contains("SpawnY", 99) && compound.contains("SpawnZ", 99)) {
this.respawnPosition = new BlockPos(compound.getInt("SpawnX"), compound.getInt("SpawnY"), compound.getInt("SpawnZ"));
this.respawnForced = compound.getBoolean("SpawnForced");
@@ -475,6 +_,7 @@
.resultOrPartial(LOGGER::error)
.ifPresent(spawnDimension -> compound.put("SpawnDimension", spawnDimension));
}
+ this.getBukkitEntity().setExtraData(compound); // CraftBukkit
compound.putBoolean("spawn_extra_particles_on_fall", this.spawnExtraParticlesOnFall);
if (this.raidOmenPosition != null) {
@@ -490,7 +_,18 @@
private void saveParentVehicle(CompoundTag tag) {
Entity rootVehicle = this.getRootVehicle();