summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-26 23:59:20 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-26 23:59:20 +0200
commit370cf58f29a5d32040f83ca17465fd493cc88f61 (patch)
tree6594beafb7a903785bbcbcd1fd2c12897c5979ef /src/main/java/at/hannibal2/skyhanni/features
parenteef49c780202dc5c64c943269f00973e70010dec (diff)
downloadskyhanni-370cf58f29a5d32040f83ca17465fd493cc88f61.tar.gz
skyhanni-370cf58f29a5d32040f83ca17465fd493cc88f61.tar.bz2
skyhanni-370cf58f29a5d32040f83ca17465fd493cc88f61.zip
Added Horsezooka Hider
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ExpOrbsOnGroundHider.kt (renamed from src/main/java/at/hannibal2/skyhanni/features/misc/ExpBottleOnGroundHider.kt)2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt22
2 files changed, 23 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ExpBottleOnGroundHider.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ExpOrbsOnGroundHider.kt
index b1f47f015..5d1b34564 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ExpBottleOnGroundHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ExpOrbsOnGroundHider.kt
@@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraft.entity.item.EntityXPOrb
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class ExpBottleOnGroundHider {
+class ExpOrbsOnGroundHider {
@SubscribeEvent
fun onCheckRender(event: CheckRenderEntityEvent<*>) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt
new file mode 100644
index 000000000..cab024462
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt
@@ -0,0 +1,22 @@
+package at.hannibal2.skyhanni.features.rift.everywhere
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.events.CheckRenderEntityEvent
+import at.hannibal2.skyhanni.utils.InventoryUtils
+import net.minecraft.entity.passive.EntityHorse
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+
+class RiftHorsezookaHider {
+
+ @SubscribeEvent
+ fun onCheckRender(event: CheckRenderEntityEvent<*>) {
+ if (!RiftAPI.inRift()) return
+ if (!SkyHanniMod.feature.rift.horsezookaHider) return
+
+ if (event.entity is EntityHorse) {
+ if (InventoryUtils.itemInHandId == "HORSEZOOKA") {
+ event.isCanceled = true
+ }
+ }
+ }
+}