Clean up not used code

This commit is contained in:
Myles 2016-04-20 01:25:00 +01:00
parent 3498d093b0
commit 7984f6400c

View File

@ -180,21 +180,6 @@ public class WorldPackets {
public void registerMap() { public void registerMap() {
map(Type.POSITION); map(Type.POSITION);
map(Type.VAR_INT); map(Type.VAR_INT);
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
Position pos = wrapper.user().get(EntityTracker.class).getCurrentlyDigging();
if (pos != null) {
if (wrapper.get(Type.POSITION, 0).equals(pos)) {
// cancel this one
if (wrapper.get(Type.VAR_INT, 0) != 0) {
wrapper.cancel();
wrapper.user().get(EntityTracker.class).setCurrentlyDigging(null);
}
}
}
}
});
} }
}); });
/* Packets which do not have any field remapping or handlers */ /* Packets which do not have any field remapping or handlers */
@ -250,26 +235,6 @@ public class WorldPackets {
} }
} }
}); });
// Digging patch (prevents it glitching)
// handler(new PacketHandler() {
// @Override
// public void handle(PacketWrapper wrapper) throws Exception {
// if(!ViaVersion.getConfig().isBlockBreakPatch()) return;
//
// EntityTracker entityTracker = wrapper.user().get(EntityTracker.class);
// final Position block = wrapper.get(Type.POSITION, 0);
// int status = wrapper.get(Type.UNSIGNED_BYTE, 0);
// if (status == 0) {
// entityTracker.setCurrentlyDigging(null);
// }
// if (status == 1) {
// entityTracker.setCurrentlyDigging(null);
// }
// if (status == 2) {
// entityTracker.setCurrentlyDigging(block);
// }
// }
// });
} }
}); });