mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-23 10:35:12 +01:00
Clean up not used code
This commit is contained in:
parent
3498d093b0
commit
7984f6400c
@ -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);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user