Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-26 16:12:43 +01:00
Fix show_item count tag
Dieser Commit ist enthalten in:
Ursprung
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());
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren