#3774: Minecraft 25w04a chat component changes

This commit is contained in:
Outfluencer
2025-01-29 20:35:46 +11:00
committed by md_5
parent 4fded9828f
commit 80bb237289
6 changed files with 197 additions and 39 deletions

View File

@@ -50,6 +50,20 @@ public final class ChatComponentTransformer
next.getHoverEvent().getContents().clear();
next.getHoverEvent().getContents().add( exception );
}
} else if ( player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_21_5 )
{
if ( next.getHoverEvent() != null && !next.getHoverEvent().isV1_21_5() )
{
next = next.duplicate();
next.getHoverEvent().setV1_21_5( true );
}
if ( next.getClickEvent() != null && !next.getClickEvent().isV1_21_5() )
{
next = next.duplicate();
next.getClickEvent().setV1_21_5( true );
}
}
return next;