From 6eb1cb0fd2d23451496ff053b96cd669c5b94608 Mon Sep 17 00:00:00 2001 From: asofold Date: Tue, 29 Jan 2013 16:02:08 +0100 Subject: [PATCH] Add getMaxBlockY to BlockCache. Might need setting in setAccess, later on. --- .../neatmonster/nocheatplus/utilities/BlockCache.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockCache.java b/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockCache.java index 6e8532b3..bd4866d2 100644 --- a/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockCache.java +++ b/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockCache.java @@ -21,6 +21,8 @@ public abstract class BlockCache { /** Cached shape values. */ private final CoordMap boundsMap = new CoordMap(); + private int maxBlockY = 255; + // TODO: switch to nodes with all details on, store a working node ? // TODO: maybe make very fast access arrays for the ray tracing checks. @@ -128,5 +130,13 @@ public abstract class BlockCache { boundsMap.put(x, y, z, nBounds); return nBounds; } + + /** + * Get the maximal y coordinate a block can be at (non air). + * @return + */ + public int getMaxBlockY(){ + return maxBlockY; + } }