Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Fix IOB in 1.13 recipe request
Dieser Commit ist enthalten in:
Ursprung
78bb5f171f
Commit
f53a6928f2
@ -826,7 +826,17 @@ public class Protocol1_13To1_12_2 extends Protocol<ClientboundPackets1_12_1, Cli
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.BYTE); // Window id
|
||||
handler(wrapper -> wrapper.write(Type.VAR_INT, Integer.parseInt(wrapper.read(Type.STRING).substring(18))));
|
||||
|
||||
handler(wrapper -> {
|
||||
String s = wrapper.read(Type.STRING);
|
||||
Integer id;
|
||||
if (s.length() < 19 || (id = Ints.tryParse(s.substring(18))) == null) {
|
||||
wrapper.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
wrapper.write(Type.VAR_INT, id);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren