Skip to content

Commit

Permalink
1.1.12 fix: currentDimensionData fix (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
JNNGL authored Mar 30, 2023
1 parent fe98ff3 commit 91bedd5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,12 @@ private JoinGame createJoinGamePacket(ProtocolVersion version) {
}

try {
CURRENT_DIMENSION_DATA_FIELD.invokeExact(joinGame, encodedDimensionRegistry.getCompound(dimension.getModernID()));
CompoundBinaryTag currentDimensionData = encodedDimensionRegistry.getCompound(dimension.getModernID());
if (version.compareTo(ProtocolVersion.MINECRAFT_1_16_2) >= 0) {
currentDimensionData = currentDimensionData.getCompound("element");
}

CURRENT_DIMENSION_DATA_FIELD.invokeExact(joinGame, currentDimensionData);
LEVEL_NAMES_FIELDS.invokeExact(joinGame, LEVELS);
REGISTRY_FIELD.invokeExact(joinGame, registryContainer.build());
} catch (Throwable e) {
Expand Down

0 comments on commit 91bedd5

Please sign in to comment.