Join game fixes

This commit is contained in:
Nassim Jahnke 2022-05-23 19:38:38 +02:00
parent 1308dcb8dd
commit 69d50fa992
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 3 additions and 2 deletions

View File

@ -253,7 +253,7 @@ public final class EntityPackets extends EntityRewriter<Protocol1_19To1_18_2> {
final String name = (String) dimensionCompound.get("name").getValue();
dimensionDataMap.put(name, new DimensionDataImpl(element));
dimensionsMap.put(element, name);
dimensionsMap.put(element.clone(), name);
}
tracker(wrapper.user()).setDimensions(dimensionDataMap);
@ -268,6 +268,7 @@ public final class EntityPackets extends EntityRewriter<Protocol1_19To1_18_2> {
map(Type.VAR_INT); // Simulation distance
map(Type.BOOLEAN); // Reduced debug info
map(Type.BOOLEAN); // Show death screen
map(Type.BOOLEAN); // Debug
map(Type.BOOLEAN); // Flat
create(Type.OPTIONAL_GLOBAL_POSITION, null); // Last death location
handler(playerTrackerHandler());

View File

@ -27,7 +27,7 @@ public final class DimensionRegistryStorage implements StorableObject {
private Map<CompoundTag, String> dimensions;
public @Nullable String dimensionKey(CompoundTag dimensionData) {
public @Nullable String dimensionKey(final CompoundTag dimensionData) {
return dimensions.get(dimensionData); // HMMMMMMMMMMM
}