Yamipa

Yamipa

3.7k Downloads

Capability with lower version with ViaVersion plugin

azzztec opened this issue ยท 3 comments

commented

I have ViaVersion installed on my 1.17.1 sever with support 1.16.5 - 1.20.2 versions. In versions from 1.17.1 plugin works well, but on versions lower 1.17.1(1.13 - 1.16.5) images are corrupted:
image

Is it possible to solve that in future?

Plugin version: 1.2.12
Server: purpur-1.17.1-1428

commented

Hi @azzztec,

Not sure how ViaVersion works internally, but I presume it intercepts the protocol injector from ProtocolLib if installed.

For performance, Yamipa hooks directly to the PlayerInjectionHandler class of ProtocolLib, which may be causing the issue:

static {
try {
for (Field field : connection.getClass().getDeclaredFields()) {
if (field.getType().equals(PlayerInjectionHandler.class)) {
field.setAccessible(true);
playerInjectionHandler = (PlayerInjectionHandler) field.get(connection);
break;
}
}
if (playerInjectionHandler == null) {
throw new RuntimeException("No valid candidate field found in ProtocolManager");
}
} catch (Exception e) {
plugin.log(Level.SEVERE, "Failed to get PlayerInjectionHandler from ProtocolLib", e);
}
}

Could you trying building Yamipa with those lines commented out (22 to 37) to see if it then works?

commented

Hi @azzztec,

Not sure how ViaVersion works internally, but I presume it intercepts the protocol injector from ProtocolLib if installed.

For performance, Yamipa hooks directly to the PlayerInjectionHandler class of ProtocolLib, which may be causing the issue:

static {
try {
for (Field field : connection.getClass().getDeclaredFields()) {
if (field.getType().equals(PlayerInjectionHandler.class)) {
field.setAccessible(true);
playerInjectionHandler = (PlayerInjectionHandler) field.get(connection);
break;
}
}
if (playerInjectionHandler == null) {
throw new RuntimeException("No valid candidate field found in ProtocolManager");
}
} catch (Exception e) {
plugin.log(Level.SEVERE, "Failed to get PlayerInjectionHandler from ProtocolLib", e);
}
}

Could you trying building Yamipa with those lines commented out (22 to 37) to see if it then works?

Same result. Also i am using in my purpur-1.16.5-1171 server YamipaPlugin-1.2.11 and it works in all versions from 1.13 to 1.20.1

commented

Then, AFAIK, there's not much we can do from this plugin's perspective.

Yamipa automatically detects the version of your server and crafts the appropiate network packets based on that. If ViaVersion is not rewriting those packets, then I'd need to debug that other plugin to understand what's going on, and I'm not familar enough to take on that challenge.