Handle packet

This commit is contained in:
Myles 2017-05-17 18:14:47 +01:00
parent 36c047bfa0
commit 7971dc797b

View File

@ -171,6 +171,18 @@ public class ProtocolSnapshotTo1_11_1 extends Protocol {
registerIncoming(State.PLAY, 0x1c, 0x1e);
registerIncoming(State.PLAY, 0x1d, 0x1f);
// New packet at 0x20
registerIncoming(State.PLAY, 0x20, 0x20, new PacketRemapper() {
@Override
public void registerMap() {
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
wrapper.cancel();
}
});
}
});
}
private int getNewSoundId(int id) { //TODO Make it better, suggestions are welcome. It's ugly and hardcoded now.