Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
Merge pull request #2052 from UnicraftNetwork/IOB-1.13-at-recipe-request-fix
Fix IOB in 1.13 recipe request
Dieser Commit ist enthalten in:
Commit
b6358cf83c
@ -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