Skip to content

Commit

Permalink
fixed supertall and some random stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
freebonsai committed Apr 28, 2024
1 parent 346bcfc commit 6a0d8dd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package me.odinmain.features.impl.render
import me.odinmain.events.impl.PacketReceivedEvent
import me.odinmain.features.Category
import me.odinmain.features.Module
import me.odinmain.features.settings.Setting.Companion.withDependency
import me.odinmain.features.settings.impl.BooleanSetting
import me.odinmain.utils.containsOneOf
import me.odinmain.utils.noControlCodes
import me.odinmain.features.settings.impl.DropdownSetting
import me.odinmain.utils.*
import me.odinmain.utils.skyblock.Island
import me.odinmain.utils.skyblock.dungeon.DungeonUtils
import me.odinmain.utils.skyblock.getSkullValue
Expand All @@ -16,6 +17,7 @@ import net.minecraft.init.Items
import net.minecraft.item.ItemBlock
import net.minecraft.network.play.server.S0EPacketSpawnObject
import net.minecraft.network.play.server.S2APacketParticles
import net.minecraft.util.EnumParticleTypes
import net.minecraftforge.client.event.RenderLivingEvent
import net.minecraftforge.event.entity.EntityJoinWorldEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
Expand All @@ -37,6 +39,9 @@ object RenderOptimizer : Module(
private val hideNonStarredMobName: Boolean by BooleanSetting(name = "Hide Non-Starred Mob Name", default = true, description = "Hides the non-starred mob name.")
private val removeArmorStands: Boolean by BooleanSetting(name = "Removes Useless ArmorStands", default = true, description = "Removes armor stands that are not necessary.")

private val showParticleOptions: Boolean by DropdownSetting("Show Particles Options")
private val removeExplosion: Boolean by BooleanSetting("Remove Explosion").withDependency { showParticleOptions }

private const val TENTACLE_TEXTURE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzM3MjIzZDAxOTA2YWI2M2FmMWExNTk4ODM0M2I4NjM3ZTg1OTMwYjkwNWMzNTEyNWI1NDViMzk4YzU5ZTFjNSJ9fX0="
private const val HEALER_FAIRY_TEXTURE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTZjM2UzMWNmYzY2NzMzMjc1YzQyZmNmYjVkOWE0NDM0MmQ2NDNiNTVjZDE0YzljNzdkMjczYTIzNTIifX19"
private const val SOUL_WEAVER_TEXTURE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMmYyNGVkNjg3NTMwNGZhNGExZjBjNzg1YjJjYjZhNmE3MjU2M2U5ZjNlMjRlYTU1ZTE4MTc4NDUyMTE5YWE2NiJ9fX0="
Expand All @@ -59,6 +64,7 @@ object RenderOptimizer : Module(
}
}
}

@SubscribeEvent
fun entityJoinWorld(event: EntityJoinWorldEvent) {
if (event.entity !is EntityArmorStand || !event.entity.isInvisible || removeArmorStands) return
Expand All @@ -78,6 +84,10 @@ object RenderOptimizer : Module(
fun onPacket(event: PacketReceivedEvent) {
if (event.packet !is S2APacketParticles) return

if (event.packet.particleType.equalsOneOf(EnumParticleTypes.EXPLOSION_NORMAL, EnumParticleTypes.EXPLOSION_LARGE, EnumParticleTypes.EXPLOSION_HUGE) && removeExplosion)
event.isCanceled = true


if (DungeonUtils.getPhase() == Island.M7P5 && hideParticles &&
!event.packet.particleType.name.containsOneOf("ENCHANTMENT TABLE", "FLAME", "FIREWORKS_SPARK"))
event.isCanceled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,5 @@ object SkyblockPlayer {
maxMana = mMana.replace(",", "").toIntOrNull() ?: return

currentDefense = Regex("([\\d|,]+)❈ Defense").find(middleRegion)?.groupValues?.get(1)?.replace(",", "")?.toIntOrNull() ?: return

devMessage("""
current Health = $currentHealth
maxHealth = $maxHealth
currentMana = $currentMana
maxMana = $maxMana
currentDefense = $currentDefense
""".trimIndent())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ object DungeonUtils {
* @return The y-value of the roof, this is the y-value of the blocks.
*/
private fun getTopLayerOfRoom(x: Int, z: Int): Int {
var currentHeight = 130
var currentHeight = 170
while (isAir(x, currentHeight, z) && currentHeight > 70) {
currentHeight--
}
Expand Down
3 changes: 2 additions & 1 deletion odinmain/src/main/resources/rooms.json
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,8 @@
"cores": [
-23510667,
1958624830,
735485465
735485465,
-1994781831
],
"crypts": 8,
"secrets": 4
Expand Down

0 comments on commit 6a0d8dd

Please sign in to comment.