Skip to content

Commit 8c07e58

Browse files
authored
Fix NPE in dimension_type registry handler in 26.1->1.21.11 (#1242)
1 parent 3b30aa2 commit 8c07e58

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

common/src/main/java/com/viaversion/viabackwards/protocol/v26_1to1_21_11/Protocol26_1To1_21_11.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ protected void registerPackets() {
8989
// Remove new environment attributes
9090
registryDataRewriter.addHandler("dimension_type", (key, tag) -> {
9191
final CompoundTag attributes = tag.getCompoundTag("attributes");
92-
removeNamespaced(attributes, "visual/block_light_tint");
93-
removeNamespaced(attributes, "visual/night_vision_color");
94-
removeNamespaced(attributes, "visual/ambient_light_color");
92+
if (attributes != null) {
93+
removeNamespaced(attributes, "visual/block_light_tint");
94+
removeNamespaced(attributes, "visual/night_vision_color");
95+
removeNamespaced(attributes, "visual/ambient_light_color");
96+
}
9597
});
9698

9799
// Move around entity variant names and sounds

0 commit comments

Comments
 (0)