mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-19 16:28:13 +01:00
Hotfix item ids in 1.21 item hover events
This commit is contained in:
parent
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
|
||||||
|
Loading…
Reference in New Issue
Block a user