diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt b/src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt new file mode 100644 index 000000000..c9e2b4bf4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/ExpBottleOnGroundHider.kt @@ -0,0 +1,19 @@ +package at.hannibal2.skyhanni.features + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.CheckRenderEntityEvent +import at.hannibal2.skyhanni.utils.LorenzUtils +import net.minecraft.entity.item.EntityXPOrb +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class ExpBottleOnGroundHider { + @SubscribeEvent + fun onCheckRender(event: CheckRenderEntityEvent<*>) { + if (!LorenzUtils.inSkyblock) return + if (!SkyHanniMod.feature.misc.hideExpBottles) return + + if (event.entity is EntityXPOrb) { + event.isCanceled = true + } + } +}
\ No newline at end of file |