mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-16 11:15:49 +01:00
Fix show_item count tag
This commit is contained in:
parent
29908523b0
commit
8409f6fb2a
@ -71,8 +71,15 @@ public class TranslatableRewriter1_16 extends TranslatableRewriter {
|
||||
// show_text as chat component
|
||||
processTranslate(contentsElement);
|
||||
hoverEvent.add("value", contentsElement);
|
||||
} else if (action.equals("show_item")) {
|
||||
JsonObject item = contentsElement.getAsJsonObject();
|
||||
JsonElement count = item.remove("count");
|
||||
if (count != null) {
|
||||
item.addProperty("Count", count.getAsByte());
|
||||
}
|
||||
|
||||
hoverEvent.addProperty("value", contentsElement.toString());
|
||||
} else {
|
||||
// show_entity and show_item as plain strings in a text field
|
||||
hoverEvent.addProperty("value", contentsElement.toString());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user