Skip to content

Commit

Permalink
v22
Browse files Browse the repository at this point in the history
  • Loading branch information
Spigey committed May 7, 2024
1 parent 6572744 commit 5d856f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/spigey/asteroide/modules/PlatformFlyModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public PlatformFlyModule() {
super(AsteroideAddon.CATEGORY, "platform-fly", "Stops you from falling");
}
private int level;
private boolean uwu;
private int tick;

@Override
public void onActivate() {
Expand All @@ -25,10 +25,13 @@ public void onActivate() {
}
@EventHandler
private void onTick(TickEvent.Pre event){
if(tick > 0) tick--;
assert mc.player != null;
if(mc.player.getVelocity().getY() == 0 || mc.player.isOnGround()) level = mc.player.getBlockPos().getY();
if(Input.isKeyPressed(GLFW.GLFW_KEY_SPACE)){level++;}
if(Input.isKeyPressed(GLFW.GLFW_KEY_LEFT_SHIFT) && !mc.player.isOnGround()){level--;}
if(Input.isKeyPressed(GLFW.GLFW_KEY_LEFT_SHIFT) && !mc.player.isOnGround()){
if(tick == 0){tick = 2; level--;}
}
if(mc.player.getBlockPos().getY() < level){
/* mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), level, mc.player.getZ(), true));
mc.player.setPosition(mc.player.getX(), level, mc.player.getZ()); */
Expand Down

0 comments on commit 5d856f3

Please sign in to comment.