Comments.

This commit is contained in:
asofold 2016-06-11 19:21:01 +02:00
parent bd68362197
commit fec027d41d
2 changed files with 10 additions and 10 deletions

View File

@ -37,16 +37,14 @@ public class Passable extends Check {
/** TESTING RATHER. */
// TODO: Make this configurable once a working set of settings has been found.
// TODO: Once made configurable... intense testing... and test cases.
// TODO: Configuration.
// TODO: Test cases.
private static boolean rt_legacy = false;
// TODO: rt_xzFactor = 1.0; // Problems: Doors, fences.
private static double rt_xzFactor = 0.98;
// TODO: Test bumping head into things.
private static double rt_heightFactor = 1.0;
// TODO: Option to ignore initially colliding blocks in general? (Alternative: interpret ignoreFirst as such.)
/**
* Convenience for player moving, to keep a better overview.
*
@ -76,9 +74,9 @@ public class Passable extends Check {
String tags = "";
// Block distances (sum, max) for from-to (not for loc!).
final int manhattan = from.manhattan(to);
if (rt_legacy) {
// Skip moves inside of ignored blocks right away [works as long as we only check between foot-locations].
// Skip moves inside of ignored blocks right away [works as long as we only check between foot-locations].
if (manhattan <= 1 && BlockProperties.isPassable(from.getTypeId())) {
// TODO: Monitor: BlockProperties.isPassable checks slightly different than before.
if (manhattan == 0){
@ -91,7 +89,7 @@ public class Passable extends Check {
}
}
}
boolean toPassable = to.isPassable();
// General condition check for using ray-tracing.
if ((!rt_legacy || toPassable) && cc.passableRayTracingCheck

View File

@ -11,8 +11,10 @@ import fr.neatmonster.nocheatplus.components.location.IGetBlockPosition;
* A kept-simple container for block positions, meant to provide fast adding and
* fast contains checks (and fast clear). Intended use is to add blocks first,
* then query if blocks are contained with advancing coordinates like with
* ray-tracing or axis-tracing. Currently adding blocks twice is not meant to
* happen, and we assume blocks to be few.
* ray-tracing or axis-tracing.
* <hr>
* Currently adding blocks twice is not meant to happen, and we assume blocks to
* be few, in fact the size is assumed to be 0 most of the time.
*
* @author asofold
*
@ -22,7 +24,7 @@ public class BlockPositionContainer implements IAddBlockPosition, IContainBlockP
// TODO: Not sure where to put this.
// TODO: Future use / interfacing could involve collecting cuboids from block positions (mining/activity/areas).
// TODO: Consider switching to HashSet or CoordMap.
// TODO: Consider switching to a HashSet or an ArrayList.
private final LinkedList<BlockPositionGet> blocks = new LinkedList<BlockPositionGet>();
private int minX, minY, minZ, maxX, maxY, maxZ;