Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 17:10:13 +01:00
Ursprung
f671a4fa5c
Commit
5b807a9f17
@ -62,7 +62,7 @@ public class Protocol1_16To1_15_2 extends Protocol<ClientboundPackets1_15, Clien
|
|||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
handler(wrapper -> {
|
handler(wrapper -> {
|
||||||
String original = wrapper.read(Type.STRING);
|
String original = wrapper.passthrough(Type.STRING);
|
||||||
JsonObject object = GsonUtil.getGson().fromJson(original, JsonObject.class);
|
JsonObject object = GsonUtil.getGson().fromJson(original, JsonObject.class);
|
||||||
JsonObject players = object.getAsJsonObject("players");
|
JsonObject players = object.getAsJsonObject("players");
|
||||||
if (players == null) return;
|
if (players == null) return;
|
||||||
@ -88,11 +88,10 @@ public class Protocol1_16To1_15_2 extends Protocol<ClientboundPackets1_15, Clien
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace data if changed
|
||||||
if (splitSamples.size() != sample.size()) {
|
if (splitSamples.size() != sample.size()) {
|
||||||
players.add("sample", splitSamples);
|
players.add("sample", splitSamples);
|
||||||
wrapper.write(Type.STRING, object.toString());
|
wrapper.set(Type.STRING, 0, object.toString());
|
||||||
} else {
|
|
||||||
wrapper.write(Type.STRING, original);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren