mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 10:57:47 +01:00
Revert setting set-back-y to block bottom on some occasions.
This commit is contained in:
parent
2fe9f1e668
commit
4ff54f0020
@ -13,7 +13,6 @@ import fr.neatmonster.nocheatplus.checks.access.ACheckData;
|
||||
import fr.neatmonster.nocheatplus.checks.access.CheckDataFactory;
|
||||
import fr.neatmonster.nocheatplus.checks.access.ICheckData;
|
||||
import fr.neatmonster.nocheatplus.utilities.ActionAccumulator;
|
||||
import fr.neatmonster.nocheatplus.utilities.BlockProperties;
|
||||
import fr.neatmonster.nocheatplus.utilities.PlayerLocation;
|
||||
|
||||
/*
|
||||
@ -31,7 +30,7 @@ import fr.neatmonster.nocheatplus.utilities.PlayerLocation;
|
||||
*/
|
||||
public class MovingData extends ACheckData {
|
||||
|
||||
private static final long IGNORE_SETBACK_Y = BlockProperties.F_SOLID | BlockProperties.F_GROUND | BlockProperties.F_CLIMBABLE | BlockProperties.F_LIQUID;
|
||||
// private static final long IGNORE_SETBACK_Y = BlockProperties.F_SOLID | BlockProperties.F_GROUND | BlockProperties.F_CLIMBABLE | BlockProperties.F_LIQUID;
|
||||
|
||||
/** The factory creating data. */
|
||||
public static final CheckDataFactory factory = new CheckDataFactory() {
|
||||
@ -294,23 +293,7 @@ public class MovingData extends ACheckData {
|
||||
else{
|
||||
LocUtil.set(setBack, loc);
|
||||
}
|
||||
final int id = loc.getTypeId();
|
||||
if (id == 0){
|
||||
// Shortcut.
|
||||
}
|
||||
else{
|
||||
// Check some block flags.
|
||||
// TODO: This might be a problem with workarounds [check which can be removed.].
|
||||
final long flags = BlockProperties.getBlockFlags(id);
|
||||
if ((flags & IGNORE_SETBACK_Y) != 0){
|
||||
// Ignore these.
|
||||
return;
|
||||
}
|
||||
else{
|
||||
// Set set-back-y to block coordinate.
|
||||
setBack.setY(loc.getBlockY());
|
||||
}
|
||||
}
|
||||
// TODO: Consider adjusting the set-back-y here. Problem: Need to take into account for bounding box (collect max-ground-height needed).
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user