kejonaMC / CrossplatForms

Configurable Bedrock Edition forms, inventory menus, and more.
GNU General Public License v3.0
77 stars 13 forks source link

Triton translator only works through PAPI #183

Open GreatGoal0 opened 1 year ago

GreatGoal0 commented 1 year ago

Describe the bug

When using the triton translate placeholder it does not return the correct value, it simply appears as text in the placeholder [lang][/lang]

To Reproduce

When using the placeholder in CrossplatForms

Expected behaviour

Let the placeholder work

Screenshots / Videos

https://discord.com/channels/853331530004299807/929122730622726174/1143650305083445308

Server Version and Plugins

No response

Geyser Dump

No response

CrossplatForms Version

Version 1.5.0 build 40 commit 3dcb802

Additional Context

Quick fix please <3

Konicai commented 1 year ago

Triton mainly operates on the packet level, but only Java Edition packets.

Geyser generally converts Java packets to Bedrock packets. When Geyser receives the Java packet, Triton will have already done its work.

If Geyser sends a Bedrock packet that was not a result of Java packet translation, Triton will never kick in. For example, Bedrock forms.

The reason that /papi parse works with Triton placeholders (the [lang] format) doesn't really have anything to do with papi, and moreso with the fact that it results in a Java packet being sent.

You can use PAPI to handle the translations though, as described here: https://triton.rexcantor64.com/concepts/placeholderapi.html That should allow Triton to be used on bedrock forms.

I can add direct support for actual Triton placeholders at a later time so that translation arguments are better supported, as described by that page.