mirror of
https://github.com/funkemunky/KauriV3.git
synced 2026-07-01 10:18:26 +00:00
Fixing Fly C falses, fixing Horizontal falses, collision issues
This commit is contained in:
@@ -51,7 +51,7 @@ public class FlyC extends Check {
|
||||
// Adding all possible velocity deltaY.
|
||||
player.getVelocityHandler().getPossibleVectors().forEach(vec -> possibleHeights.add(vec.getY()));
|
||||
|
||||
if(player.getBlockInfo().onHalfBlock) {
|
||||
if(player.getInfo().lastHalfBlock.isNotPassed(1)) {
|
||||
possibleHeights.add(0.5);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ public class FlyC extends Check {
|
||||
if(!jumped || player.getInfo().blockAbove.isNotPassed(1)
|
||||
|| player.getInfo().climbTimer.isNotPassed(1)
|
||||
|| player.getInfo().wasOnSlime
|
||||
|| player.getBlockInfo().nearSteppableEntity
|
||||
|| player.getInfo().lastFence.isNotPassed(1)
|
||||
|| player.getInfo().lastHalfBlock.isNotPassed(1)
|
||||
|| player.getInfo().slimeTimer.isNotPassed(1)
|
||||
@@ -83,7 +84,7 @@ public class FlyC extends Check {
|
||||
possibleHeights.add(slimeY);
|
||||
|
||||
maximumHeightCheck: {
|
||||
if(player.getInfo().nearGround) break maximumHeightCheck;
|
||||
if(player.getInfo().nearGround || player.getBlockInfo().nearSteppableEntity) break maximumHeightCheck;
|
||||
|
||||
double maxHeight = possibleHeights.stream().max(Comparator.comparing(c -> c)).orElse(1.5) + 0.05f;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.Deque;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@CheckData(name = "Horizontal", checkId = "horizontala", type = CheckType.MOVEMENT)
|
||||
public class Horizontal extends Check {
|
||||
@@ -263,9 +264,8 @@ public class Horizontal extends Check {
|
||||
} else debug("bad movement");
|
||||
} else if (buffer > 0) buffer -= 0.05f;
|
||||
|
||||
debug("smallest=%s f=%s lf=%s pm=%.5f dxz=%.5f b=%.1f f/s=%.2f,%.2f soulsand=%s ", smallestDelta, frictionList, lfrictionList, pmotion,
|
||||
player.getMovement().getDeltaXZ(), buffer, forward, strafe,
|
||||
player.getBlockInfo().onSoulSand);
|
||||
debug("smallest=%s efcs=[%s] pm=%.5f dxz=%.5f b=%.1f", smallestDelta, player.getPotionHandler().potionEffects.stream().map(pe -> pe.getType().getName() + ";" + pe.getAmplifier()).collect(Collectors.joining(", ")), pmotion,
|
||||
player.getMovement().getDeltaXZ(), buffer);
|
||||
}
|
||||
lastLastClientGround = player.getMovement().getFrom().isOnGround();
|
||||
previousFrom = player.getMovement().getFrom().getLoc().clone();
|
||||
|
||||
@@ -75,12 +75,12 @@ public class BlockInformation {
|
||||
else if(dy < -10) dy = -10;
|
||||
if(dh > 10) dh = 10;
|
||||
|
||||
int startX = Location.locToBlock(player.getMovement().getTo().getLoc().x - 0.4 - dh);
|
||||
int endX = Location.locToBlock(player.getMovement().getTo().getLoc().x + 0.4 + dh);
|
||||
int startY = Location.locToBlock(player.getMovement().getTo().getLoc().y - 0.4 + dy);
|
||||
int endY = Location.locToBlock(player.getMovement().getTo().getLoc().y + 2.2 + dy);
|
||||
int startZ = Location.locToBlock(player.getMovement().getTo().getLoc().z - 0.4 - dh);
|
||||
int endZ = Location.locToBlock(player.getMovement().getTo().getLoc().z + 0.4 + dh);
|
||||
int startX = Location.locToBlock(player.getMovement().getTo().getLoc().x - 0.6 - dh);
|
||||
int endX = Location.locToBlock(player.getMovement().getTo().getLoc().x + 0.6 + dh);
|
||||
int startY = Location.locToBlock(player.getMovement().getTo().getLoc().y - 0.6 + dy);
|
||||
int endY = Location.locToBlock(player.getMovement().getTo().getLoc().y + 2.4 + dy);
|
||||
int startZ = Location.locToBlock(player.getMovement().getTo().getLoc().z - 0.6 - dh);
|
||||
int endZ = Location.locToBlock(player.getMovement().getTo().getLoc().z + 0.6 + dh);
|
||||
|
||||
SimpleCollisionBox waterBox = player.getMovement().getTo().getBox().copy().expand(0, -.38, 0);
|
||||
|
||||
@@ -211,8 +211,8 @@ public class BlockInformation {
|
||||
|
||||
SimpleCollisionBox box = player.getMovement().getTo().getBox().copy();
|
||||
|
||||
box.expand(Math.abs(player.getMovement().getDeltaX()) + 0.1, -0.001,
|
||||
Math.abs(player.getMovement().getDeltaZ()) + 0.1);
|
||||
box.expand(Math.abs(player.getMovement().getDeltaXZ() / 2) + 0.1, -0.001,
|
||||
Math.abs(player.getMovement().getDeltaXZ() / 2) + 0.1);
|
||||
if (blockBox.isCollided(box))
|
||||
collidesHorizontally = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user