diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor')
8 files changed, 25 insertions, 20 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java index 4c3fff71..32f46b15 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java @@ -164,12 +164,12 @@ public class RoomProcessorBlazeSolver extends GeneralRoomProcessor { boolean border = true; + RenderUtils.highlightBox(entity, AxisAlignedBB.fromBounds(-0.8,0, -0.8, 0.8, 2, 0.8), FeatureRegistry.SOLVER_BLAZE.getBlazeColor(), partialTicks, false); if (entity == theoneafterit) { RenderUtils.highlightBox(entity, AxisAlignedBB.fromBounds(-0.8,0, -0.8, 0.8, 2, 0.8), FeatureRegistry.SOLVER_BLAZE.getNextUpBlazeColor(), partialTicks, false); } else if (entity == nextBlaze) RenderUtils.highlightBox(entity, AxisAlignedBB.fromBounds(-0.8,0, -0.8, 0.8, 2, 0.8), FeatureRegistry.SOLVER_BLAZE.getNextBlazeColor(), partialTicks, false); - else - RenderUtils.highlightBox(entity, AxisAlignedBB.fromBounds(-0.8,0, -0.8, 0.8, 2, 0.8), FeatureRegistry.SOLVER_BLAZE.getBlazeColor(), partialTicks, false); + GlStateManager.color(1,1,1,1); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java index 2236d876..03654a88 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java @@ -143,7 +143,7 @@ public class RoomProcessorIcePath extends GeneralRoomProcessor { super.drawWorld(partialTicks); if (!FeatureRegistry.SOLVER_SILVERFISH.isEnabled()) return; if (!err) - RenderUtils.drawLines(solution, new AColor(0,255,0, 255),1, partialTicks, false); + RenderUtils.drawLines(solution, FeatureRegistry.SOLVER_SILVERFISH.getLineColor(),FeatureRegistry.SOLVER_SILVERFISH.getLineWidth(), partialTicks, true); } public Point getPointOfSilverFishOnMap(BlockPos blockPos) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java index e242c3c3..7994e86b 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java @@ -28,6 +28,7 @@ import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.init.Blocks; +import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.IChatComponent; @@ -108,7 +109,7 @@ public class RoomProcessorRiddle extends GeneralRoomProcessor { super.drawWorld(partialTicks); if (!FeatureRegistry.SOLVER_RIDDLE.isEnabled()) return; if (chest != null) { - RenderUtils.highlightBlock(chest, new Color(0,255,0, 50),partialTicks, true); + RenderUtils.highlightBoxAColor(AxisAlignedBB.fromBounds(chest.getX(), chest.getY(), chest.getZ(), chest.getX()+1, chest.getY() + 1, chest.getZ() + 1), FeatureRegistry.SOLVER_RIDDLE.getTargetColor(), partialTicks, true); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java index 9afb50c5..a16fc11e 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java @@ -26,6 +26,7 @@ import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.init.Blocks; +import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -127,11 +128,11 @@ public class RoomProcessorTeleportMazeSolver extends GeneralRoomProcessor { super.drawWorld(partialTicks); if (!FeatureRegistry.SOLVER_TELEPORT.isEnabled()) return; for (BlockPos bpos:visitedPortals) { - RenderUtils.highlightBlock(bpos, new Color(255,0,0,100), partialTicks, true); + RenderUtils.highlightBoxAColor( AxisAlignedBB.fromBounds(bpos.getX(), bpos.getY(), bpos.getZ(), bpos.getX()+1, bpos.getY() + 1, bpos.getZ() + 1), FeatureRegistry.SOLVER_TELEPORT.getTargetColor2(), partialTicks, true); } if (intersection != null) { - RenderUtils.highlightBlock(intersection, new Color(0, 255, 0, 100), partialTicks, false); + RenderUtils.highlightBoxAColor( AxisAlignedBB.fromBounds(intersection.getX(), intersection.getY(), intersection.getZ(), intersection.getX()+1, intersection.getY() + 1, intersection.getZ() + 1), FeatureRegistry.SOLVER_TELEPORT.getTargetColor(), partialTicks, false); } } public static class Generator implements RoomProcessorGenerator<RoomProcessorTeleportMazeSolver> { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java index 418c615d..42c178cd 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java @@ -200,8 +200,9 @@ public class RoomProcessorTicTacToeSolver extends GeneralRoomProcessor { } whoseturn = ones < negativeones; } - RenderUtils.highlightBlock(block, whoseturn ? new Color(0,255,255,50) - : new Color(255, 201, 0,50), partialTicks, true); + RenderUtils.highlightBoxAColor(AxisAlignedBB.fromBounds(block.getX(), block.getY(), block.getZ(), block.getX()+1, block.getY() + 1, block.getZ() + 1), + whoseturn ? FeatureRegistry.SOLVER_TICTACTOE.getTargetColor() + : FeatureRegistry.SOLVER_TICTACTOE.getTargetColor2(), partialTicks, true); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java index dcf4434a..9312414b 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java @@ -27,6 +27,8 @@ import kr.syeyoung.dungeonsguide.utils.SkyblockUtils; import kr.syeyoung.dungeonsguide.utils.TextUtils; import kr.syeyoung.dungeonsguide.wsresource.StaticResourceCache; import net.minecraft.client.Minecraft; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.IChatComponent; import org.apache.commons.lang3.math.NumberUtils; @@ -145,7 +147,8 @@ public class RoomProcessorTrivia extends GeneralRoomProcessor { OffsetPoint op = (OffsetPoint) getDungeonRoom().getDungeonRoomInfo().getProperties().get(correctAnswer); if (op != null) { - RenderUtils.highlightBlock(op.getBlockPos(getDungeonRoom()), new Color(0,255,0,50), partialTicks, false); + BlockPos solution = op.getBlockPos(getDungeonRoom()); + RenderUtils.highlightBoxAColor(AxisAlignedBB.fromBounds(solution.getX(), solution.getY(), solution.getZ(), solution.getX()+1, solution.getY() + 1, solution.getZ() + 1), FeatureRegistry.SOLVER_KAHOOT.getTargetColor(), partialTicks, true); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/RoomProcessorBoxSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/RoomProcessorBoxSolver.java index a34861c9..bf81bf72 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/RoomProcessorBoxSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/RoomProcessorBoxSolver.java @@ -31,10 +31,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.IChatComponent; -import net.minecraft.util.MathHelper; +import net.minecraft.util.*; import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL14; @@ -332,7 +329,7 @@ public class RoomProcessorBoxSolver extends GeneralRoomProcessor { public void drawScreen(float partialTicks) { super.drawScreen(partialTicks); if (!FeatureRegistry.SOLVER_BOX.isEnabled()) return; - if (FeatureRegistry.SOLVER_BOX_DISABLE_TEXT.isEnabled()) return; + if (FeatureRegistry.SOLVER_BOX.disableText()) return; FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; GlStateManager.enableBlend(); GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); @@ -359,21 +356,23 @@ public class RoomProcessorBoxSolver extends GeneralRoomProcessor { dir = new BlockPos(MathHelper.clamp_int(dir.getX(), -1, 1), 0, MathHelper.clamp_double(dir.getZ(), -1, 1)); BlockPos highlight = pos2.add(dir); - RenderUtils.highlightBlock(highlight, new Color(0, 255, 0, MathHelper.clamp_int((int) (Minecraft.getMinecraft().thePlayer.getPosition().distanceSq(highlight)), 50, 150)), partialTicks, false); + AColor color = FeatureRegistry.SOLVER_BOX.getTargetColor().multiplyAlpha(MathHelper.clamp_double(Minecraft.getMinecraft().thePlayer.getPosition().distanceSq(highlight), 100, 255) / 255); + RenderUtils.highlightBoxAColor(AxisAlignedBB.fromBounds(highlight.getX(), highlight.getY(), highlight.getZ(), highlight.getX()+1, highlight.getY() + 1, highlight.getZ() + 1), color, partialTicks, false); } if (pathFound != null) { - RenderUtils.drawLines(pathFound, new AColor(0, 255, 0, 255),1, partialTicks, true); + RenderUtils.drawLines(pathFound, FeatureRegistry.SOLVER_BOX.getLineColor(),FeatureRegistry.SOLVER_BOX.getLineWidth(), partialTicks, true); } } else { if (totalPath != null) { - RenderUtils.drawLines(totalPath, new AColor(0, 255, 0, 255),1, partialTicks, false); + RenderUtils.drawLines(totalPath, FeatureRegistry.SOLVER_BOX.getLineColor(),FeatureRegistry.SOLVER_BOX.getLineWidth(), partialTicks, false); } if (totalPushedBlocks != null) { for (int i = 0; i < totalPushedBlocks.size(); i++) { BlockPos pos = totalPushedBlocks.get(i); - RenderUtils.highlightBlock(pos, new Color(0, 255, 255, 50), partialTicks, false); - RenderUtils.drawTextAtWorld("#"+i, pos.getX()+0.5f, pos.getY() +0.5f, pos.getZ() + 0.5f, i != step ?0xFF000000 : 0xFF00FF00, 0.1f, false, false, partialTicks); + RenderUtils.highlightBoxAColor(AxisAlignedBB.fromBounds(pos.getX(), pos.getY(), pos.getZ(), pos.getX()+1, pos.getY() + 1, pos.getZ() + 1), FeatureRegistry.SOLVER_BOX.getTargetColor(), partialTicks, false); + RenderUtils.drawTextAtWorld("#"+i, pos.getX()+0.5f, pos.getY() +0.5f, pos.getZ() + 0.5f, i != step ? + RenderUtils.getColorAt(pos.getX(), pos.getY(), pos.getZ(), FeatureRegistry.SOLVER_BOX.getTextColor2()) : RenderUtils.getColorAt(pos.getX(), pos.getY(), pos.getZ(), FeatureRegistry.SOLVER_BOX.getTextColor()), 0.1f, false, false, partialTicks); } } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/icefill/RoomProcessorIcePath2.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/icefill/RoomProcessorIcePath2.java index c0209fc6..c31ba753 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/icefill/RoomProcessorIcePath2.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/icefill/RoomProcessorIcePath2.java @@ -108,7 +108,7 @@ public class RoomProcessorIcePath2 extends GeneralRoomProcessor { public void drawWorld(float partialTicks) { if (!FeatureRegistry.SOLVER_ICEPATH.isEnabled()) return; for (List<BlockPos> solution:this.solution) - RenderUtils.drawLines(solution, new AColor(0,255,0, 255), 1, partialTicks, true); + RenderUtils.drawLines(solution, FeatureRegistry.SOLVER_ICEPATH.getLineColor(),FeatureRegistry.SOLVER_ICEPATH.getLineWidth(), partialTicks, true); } public static class Generator implements RoomProcessorGenerator<RoomProcessorIcePath2> { |