public static Setting<Boolean> drawSpawnableBlocks;
public static Setting<Integer> spawnableBlocksRenderWidth;
public static Setting<Integer> spawnableBlocksRenderHeight;
+ public static Setting<Boolean> invertBoxColorPlayerInside;
public static void loadConfig() {
configDir = new File(".", "config");
outerBoxesOnly = setup(config, "general", "outerBoxesOnly", false, "If set to true only the outer bounding boxes are rendered.");
alwaysVisible = setup(config, "general", "alwaysVisible", false, "If set to true boxes will be visible even through other blocks.");
keepCacheBetweenSessions = setup(config, "general", "keepCacheBetweenSessions", false, "If set to true bounding box caches will be kept between sessions.");
+ invertBoxColorPlayerInside = setup(config, "general", "invertBoxColorPlayerInside", false, "If set to true the color of any bounding box the player is inside will be inverted.");
drawBeacons = setup(config, "beacons", "drawBeacons", true, "If set to true beacon bounding boxes will be drawn.");
double maxY = max.getY();
double maxZ = max.getZ();
+ if(ConfigManager.invertBoxColorPlayerInside.get() &&
+ playerInsideBoundingBox(minX, minY, minZ, maxX, maxY, maxZ)) {
+ color = new Color(255 - color.getRed(), 255 - color.getGreen(), 255 - color.getBlue());
+ }
+
Renderer renderer = Renderer.startQuads()
.setColor(color)
.setAlpha(alpha);
renderer.render();
}
+ private boolean playerInsideBoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
+ return minX < 0 && maxX > 0 && minY < 0 && maxY > 0 && minZ < 0 && maxZ > 0;
+ }
+
void renderLine(OffsetPoint startPoint, OffsetPoint endPoint, Color color) {
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE);
Renderer.startLines()