Skip to content

Commit fbe6a67

Browse files
committed
Fix inverted hidden components checks in 1.21.5->1.21.4
Fixes #1110
1 parent 454e97c commit fbe6a67

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_5to1_21_4/rewriter/ComponentRewriter1_21_5.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ private void updateDataComponents(final CompoundTag componentsTag) {
177177
private void updateShowInTooltip(final CompoundTag tag, final String key, final Set<String> hiddenComponents) {
178178
final CompoundTag data = getNamespacedCompoundTag(tag, key);
179179
if (data != null) {
180-
data.putBoolean("show_in_tooltip", hiddenComponents.contains(key));
180+
data.putBoolean("show_in_tooltip", !hiddenComponents.contains(key));
181181
}
182182
}
183183

@@ -190,7 +190,7 @@ private void handleAdventureModePredicate(final CompoundTag componentsTag, final
190190
removeDataComponents(componentsTag, key);
191191
final CompoundTag predicate = new CompoundTag();
192192
predicate.put("predicates", blockPredicates);
193-
predicate.putBoolean("show_in_tooltip", hiddenComponents.contains(key));
193+
predicate.putBoolean("show_in_tooltip", !hiddenComponents.contains(key));
194194
componentsTag.put(key, predicate);
195195
}
196196

@@ -200,7 +200,7 @@ private void handleEnchantments(final CompoundTag componentsTag, final String ke
200200
removeNamespaced(componentsTag, key);
201201
final CompoundTag enchantments = new CompoundTag();
202202
enchantments.put("levels", levels);
203-
enchantments.putBoolean("show_in_tooltip", hiddenComponents.contains(key));
203+
enchantments.putBoolean("show_in_tooltip", !hiddenComponents.contains(key));
204204
componentsTag.put(key, enchantments);
205205
}
206206
}

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ checkerQual = "3.51.0"
1616
paper = "1.16.5-R0.1-SNAPSHOT"
1717
velocity = "3.1.1"
1818
fabricLoader = "0.11.6"
19-
viaProxy = "3.4.5-SNAPSHOT"
19+
viaProxy = "3.4.6-SNAPSHOT"
2020

2121
[libraries]
2222

0 commit comments

Comments
 (0)