aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/kotlin/features/FeatureManager.kt2
-rw-r--r--src/main/kotlin/features/items/EtherwarpOverlay.kt49
-rw-r--r--src/main/kotlin/gui/config/ManagedConfig.kt1
-rw-r--r--src/main/kotlin/util/skyblock/SkyBlockItems.kt2
-rw-r--r--translations/en_us.json9
5 files changed, 63 insertions, 0 deletions
diff --git a/src/main/kotlin/features/FeatureManager.kt b/src/main/kotlin/features/FeatureManager.kt
index 447edb8..e0799c4 100644
--- a/src/main/kotlin/features/FeatureManager.kt
+++ b/src/main/kotlin/features/FeatureManager.kt
@@ -28,6 +28,7 @@ import moe.nea.firmament.features.inventory.SlotLocking
import moe.nea.firmament.features.inventory.WardrobeKeybinds
import moe.nea.firmament.features.inventory.buttons.InventoryButtons
import moe.nea.firmament.features.inventory.storageoverlay.StorageOverlay
+import moe.nea.firmament.features.items.EtherwarpOverlay
import moe.nea.firmament.features.mining.PickaxeAbility
import moe.nea.firmament.features.mining.PristineProfitTracker
import moe.nea.firmament.features.misc.CustomCapes
@@ -72,6 +73,7 @@ object FeatureManager : DataHolder<FeatureManager.Config>(serializer(), "feature
loadFeature(Fixes)
loadFeature(CustomCapes)
loadFeature(Hud)
+ loadFeature(EtherwarpOverlay)
loadFeature(WardrobeKeybinds)
loadFeature(DianaWaypoints)
loadFeature(ItemRarityCosmetics)
diff --git a/src/main/kotlin/features/items/EtherwarpOverlay.kt b/src/main/kotlin/features/items/EtherwarpOverlay.kt
new file mode 100644
index 0000000..83e533c
--- /dev/null
+++ b/src/main/kotlin/features/items/EtherwarpOverlay.kt
@@ -0,0 +1,49 @@
+package moe.nea.firmament.features.items
+
+import moe.nea.firmament.annotations.Subscribe
+import moe.nea.firmament.features.FirmamentFeature
+import moe.nea.firmament.gui.config.ManagedConfig
+import moe.nea.firmament.util.MC
+import net.minecraft.util.hit.BlockHitResult
+import moe.nea.firmament.events.WorldRenderLastEvent
+import moe.nea.firmament.util.extraAttributes
+import moe.nea.firmament.util.render.RenderInWorldContext
+import moe.nea.firmament.util.skyBlockId
+import moe.nea.firmament.util.skyblock.SkyBlockItems
+
+object EtherwarpOverlay : FirmamentFeature {
+ override val identifier: String
+ get() = "etherwarp-overlay"
+
+ object TConfig : ManagedConfig(identifier, Category.ITEMS) {
+ var etherwarpOverlay by toggle("etherwarp-overlay") { false }
+ var cube by toggle("cube") { true }
+ var wireframe by toggle("wireframe") { false }
+ }
+
+ override val config: ManagedConfig
+ get() = TConfig
+
+
+ @Subscribe
+ fun renderEtherwarpOverlay(event: WorldRenderLastEvent) {
+ if (!TConfig.etherwarpOverlay) return
+ val player = MC.player ?: return
+ val world = player.world
+ val camera = MC.camera ?: return
+ val heldItem = MC.stackInHand
+ if (heldItem.skyBlockId !in listOf(SkyBlockItems.ASPECT_OF_THE_VOID, SkyBlockItems.ASPECT_OF_THE_END)) return
+ if (!heldItem.extraAttributes.contains("ethermerge")) return
+
+ val hitResult = camera.raycast(61.0, 0.0f, false)
+ if (hitResult !is BlockHitResult) return
+ val blockPos = hitResult.blockPos
+ if (camera.squaredDistanceTo(blockPos.toCenterPos()) > 61 * 61) return
+ if (!world.getBlockState(blockPos.up()).isAir) return
+ if (!world.getBlockState(blockPos.up(2)).isAir) return
+ RenderInWorldContext.renderInWorld(event) {
+ if (TConfig.cube) block(blockPos, 0xFFFFFF00.toInt())
+ if (TConfig.wireframe) wireframeCube(blockPos, 10f)
+ }
+ }
+}
diff --git a/src/main/kotlin/gui/config/ManagedConfig.kt b/src/main/kotlin/gui/config/ManagedConfig.kt
index 125eaab..ba6792d 100644
--- a/src/main/kotlin/gui/config/ManagedConfig.kt
+++ b/src/main/kotlin/gui/config/ManagedConfig.kt
@@ -38,6 +38,7 @@ abstract class ManagedConfig(
MISC,
CHAT,
INVENTORY,
+ ITEMS,
MINING,
GARDEN,
EVENTS,
diff --git a/src/main/kotlin/util/skyblock/SkyBlockItems.kt b/src/main/kotlin/util/skyblock/SkyBlockItems.kt
index 74e1327..9854be0 100644
--- a/src/main/kotlin/util/skyblock/SkyBlockItems.kt
+++ b/src/main/kotlin/util/skyblock/SkyBlockItems.kt
@@ -14,4 +14,6 @@ object SkyBlockItems {
val SLICE_OF_GREEN_VELVET_CAKE = SkyblockId("SLICE_OF_GREEN_VELVET_CAKE")
val SLICE_OF_RED_VELVET_CAKE = SkyblockId("SLICE_OF_RED_VELVET_CAKE")
val SLICE_OF_STRAWBERRY_SHORTCAKE = SkyblockId("SLICE_OF_STRAWBERRY_SHORTCAKE")
+ val ASPECT_OF_THE_VOID = SkyblockId("ASPECT_OF_THE_VOID")
+ val ASPECT_OF_THE_END = SkyblockId("ASPECT_OF_THE_END")
}
diff --git a/translations/en_us.json b/translations/en_us.json
index fbed855..baa6454 100644
--- a/translations/en_us.json
+++ b/translations/en_us.json
@@ -41,6 +41,8 @@
"firmament.config.category.integrations.description": "Integrations with other mods, as well as texture packs",
"firmament.config.category.inventory": "Inventory",
"firmament.config.category.inventory.description": "Features for anything that happens in a chest or inventory",
+ "firmament.config.category.items": "Items",
+ "firmament.config.category.items.description": "Features for items",
"firmament.config.category.meta": "Meta & Firmament",
"firmament.config.category.meta.description": "Settings for Firmament and the item repo",
"firmament.config.category.mining": "Mining",
@@ -113,6 +115,13 @@
"firmament.config.diana.ancestral-teleport.description": "Click to teleport near the guessed burrow.",
"firmament.config.diana.nearby-waypoints": "Nearby Waypoints Highlighter",
"firmament.config.diana.nearby-waypoints.description": "Highlight nearby diana burrows.",
+ "firmament.config.etherwarp-overlay": "Etherwarp Overlay",
+ "firmament.config.etherwarp-overlay.cube": "Cube",
+ "firmament.config.etherwarp-overlay.cube.description": "Displays a full cube on the block",
+ "firmament.config.etherwarp-overlay.etherwarp-overlay": "Etherwarp Overlay",
+ "firmament.config.etherwarp-overlay.etherwarp-overlay.description": "Display an overlay that tells you what block you will warp to.",
+ "firmament.config.etherwarp-overlay.wireframe": "Outline",
+ "firmament.config.etherwarp-overlay.wireframe.description": "Displays a full outline on the block",
"firmament.config.fairy-souls": "Fairy Souls",
"firmament.config.fairy-souls.reset": "Reset Collected Fairy Souls",
"firmament.config.fairy-souls.reset.description": "Reset all collected fairy souls, allowing you to restart from null.",