Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class Player {
public BoundingBox3D boundingBox = null;
public String sidestep = "None";
public boolean wadStart = false;
public boolean flying = false;

@InfoString.Getter
public static LandingBlock getLatestLB() {
Expand Down Expand Up @@ -225,7 +226,7 @@ public Player buildAndSave() {
Player.updateDisplayInstance();
return this;
}
if (prev.onGround) airtime = 0;
if (prev.onGround || flying) airtime = 0;
else airtime = prev.airtime + 1;
if (prev.onGround && !onGround) airtime = 1;

Expand Down Expand Up @@ -391,6 +392,16 @@ public String getSidestep() {
return sidestep;
}

@InfoString.Getter
public boolean isFlying() {
return flying;
}

public Player setFlying(boolean flying) {
this.flying = flying;
return this;
}

@InfoString.DataClass
public static class Blip implements FormatDecimals {
@InfoString.Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public void onClientTickEnd(MinecraftClient mc) {
new Vector3D(playerBB.minX, playerBB.minY, playerBB.minZ),
new Vector3D(playerBB.maxX, playerBB.maxY, playerBB.maxZ)
))
.setFlying(mcPlayer.getAbilities().flying)
.constructKeyInput()
.setKeyMSList(timeQueue)
.buildAndSave();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public void onTick(TickEvent.ClientTickEvent e) {
new Vector3D(playerBB.minX, playerBB.minY, playerBB.minZ),
new Vector3D(playerBB.maxX, playerBB.maxY, playerBB.maxZ)
))
.setFlying(mcPlayer.capabilities.isFlying)
.constructKeyInput()
.setKeyMSList(timeQueue.copy())
.buildAndSave();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package io.github.kurrycat.mpkmod.compatibility.forge_1_8;

import io.github.kurrycat.mpkmod.compatibility.MCClasses.*;
import io.github.kurrycat.mpkmod.util.BoundingBox3D;
import io.github.kurrycat.mpkmod.util.Debug;
import io.github.kurrycat.mpkmod.util.Vector2D;
import io.github.kurrycat.mpkmod.util.Vector3D;
import io.github.kurrycat.mpkmod.util.ScissorBox;
import io.github.kurrycat.mpkmod.util.*;
import io.github.kurrycat.mpknetapi.common.network.packet.MPKPacket;
import net.minecraft.block.Block;
import net.minecraft.block.properties.IProperty;
Expand Down Expand Up @@ -35,8 +31,8 @@
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.util.List;
import java.util.*;
import java.util.List;
import java.util.stream.Collectors;

public class FunctionCompatibility implements FunctionHolder,
Expand Down