@EventHandler
public void onTick(TickEvent e) {
script.update();
}
@EventHandler
public void onPacket(PacketEvent e) {
if (e.getPacket() instanceof PlayerPositionLookS2CPacket && stopWatch.finished(600)) {
script.cleanup().addTickStep(0, () -> {
mc.player.setOnGround(true);
mc.player.velocity.y = 0.6;
});
stopWatch.reset();
}
}
@EventHandler
public void onBlockCollision(BlockCollisionEvent e) {
if (e.getBlockPos().getY() >= mc.player.getBlockY() && mc.player.horizontalCollision && stopWatch.finished(600)) {
e.setState(Blocks.AIR.getDefaultState());
}
}