Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-11-16 04:50:10 +01:00
Hotfix item ids in 1.21 item hover events
Dieser Commit ist enthalten in:
Ursprung
9c2021b947
Commit
55ea81f9c7
@ -52,28 +52,13 @@ public final class ComponentRewriter1_21 extends TranslatableRewriter<Clientboun
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleContainerComponent(final CompoundTag tag) {
|
|
||||||
final ListTag<CompoundTag> container = TagUtil.getNamespacedCompoundTagList(tag, "container");
|
|
||||||
if (container == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (final CompoundTag entryTag : container) {
|
|
||||||
final CompoundTag itemTag = entryTag.getCompoundTag("item");
|
|
||||||
|
|
||||||
final CompoundTag componentsTag = itemTag.getCompoundTag("components");
|
|
||||||
if (componentsTag != null) {
|
|
||||||
convertAttributeModifiersComponent(componentsTag);
|
|
||||||
handleContainerComponent(componentsTag);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void handleShowItem(final UserConnection connection, final CompoundTag componentsTag) {
|
protected void handleShowItem(final UserConnection connection, final CompoundTag itemTag, final CompoundTag componentsTag) {
|
||||||
convertAttributeModifiersComponent(componentsTag);
|
super.handleShowItem(connection, itemTag, componentsTag);
|
||||||
handleContainerComponent(componentsTag);
|
if (componentsTag != null) {
|
||||||
|
|
||||||
TagUtil.removeNamespaced(componentsTag, "jukebox_playable");
|
TagUtil.removeNamespaced(componentsTag, "jukebox_playable");
|
||||||
|
convertAttributeModifiersComponent(componentsTag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren