Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line to next blaze #435

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,13 @@ object Config : Vigilant(
)
var showNextBlaze = false

@Property(
type = PropertyType.SWITCH, name = "Line to Next Blaze",
description = "Draws line to next blaze to shoot in Higher or Lower.",
category = "Dungeons", subcategory = "Solvers"
)
var lineToNextBlaze = false

@Property(
type = PropertyType.COLOR, name = "Lowest Blaze Color",
description = "Color used to highlight the lowest blaze in.",
Expand All @@ -733,6 +740,13 @@ object Config : Vigilant(
)
var nextBlazeColor = Color(255, 255, 0, 200)

@Property(
type = PropertyType.COLOR, name = "Line to Next Blaze Color",
description = "Color used to draw to the next blaze in.",
category = "Dungeons", subcategory = "Solvers"
)
var lineToNextBlazeColor = Color(255, 255, 0, 200)

@Property(
type = PropertyType.SWITCH, name = "Boulder Solver",
description = "§b[WIP] §rShow which boxes to move on the Boulder puzzle.",
Expand Down Expand Up @@ -2917,9 +2931,11 @@ object Config : Vigilant(
addDependency("highlightDoorOpener", "spiritLeapNames")

addDependency("showNextBlaze", "blazeSolver")
addDependency("lineToNextBlaze", "showNextBlaze")
addDependency("lowestBlazeColor", "blazeSolver")
addDependency("highestBlazeColor", "blazeSolver")
addDependency("nextBlazeColor", "showNextBlaze")
addDependency("lineToNextBlazeColor", "lineToNextBlaze")
addDependency("teleportMazeSolverColor", "teleportMazeSolver")
addDependency("ticTacToeSolverColor", "ticTacToeSolver")
addDependency("clickInOrderFirst", "clickInOrderTerminalSolver")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@ object BlazeSolver {
event.partialTicks,
matrixStack
)
if (Skytils.config.lineToNextBlaze) {
val secondLowestBlaze = orderedBlazes.getOrNull(1)?.blaze ?: return
RenderUtil.draw3DLine(
Vec3(lowestBlaze.posX, lowestBlaze.posY + 1.5, lowestBlaze.posZ),
Vec3(secondLowestBlaze.posX, secondLowestBlaze.posY + 1.5, secondLowestBlaze.posZ),
5,
Skytils.config.lineToNextBlazeColor,
event.partialTicks,
UMatrixStack.Compat.get()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the already created matrixstack

Suggested change
UMatrixStack.Compat.get()
matrixStack

)
}
}
if (blazeMode > 0) {
val shootableBlaze = orderedBlazes.last()
Expand All @@ -213,6 +224,17 @@ object BlazeSolver {
event.partialTicks,
matrixStack
)
if (Skytils.config.lineToNextBlaze) {
val secondHighestBlaze = orderedBlazes.getOrNull(orderedBlazes.size - 2)?.blaze ?: return
RenderUtil.draw3DLine(
Vec3(highestBlaze.posX, highestBlaze.posY + 1.5, highestBlaze.posZ),
Vec3(secondHighestBlaze.posX, secondHighestBlaze.posY + 1.5, secondHighestBlaze.posZ),
5,
Skytils.config.lineToNextBlazeColor,
event.partialTicks,
UMatrixStack.Compat.get()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Suggested change
UMatrixStack.Compat.get()
matrixStack

)
}
}
}
}
Expand Down