Skip to content

Commit

Permalink
refactor: fix incorrect parameter type and delete BlockChangeEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Nov 3, 2024
1 parent 56e70f9 commit 254a9f2
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 107 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import gg.skytils.event.register
import gg.skytils.skytilsmod.Skytils
import gg.skytils.skytilsmod.Skytils.mc
import gg.skytils.skytilsmod.core.structure.GuiElement
import gg.skytils.skytilsmod.events.impl.BlockChangeEvent
import gg.skytils.skytilsmod.mixins.transformers.accessors.AccessorEnumDyeColor
import gg.skytils.skytilsmod.utils.*
import gg.skytils.skytilsmod.utils.graphics.ScreenRenderer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import gg.essential.universal.UMatrixStack
import gg.skytils.event.EventSubscriber
import gg.skytils.event.impl.play.WorldUnloadEvent
import gg.skytils.event.impl.render.WorldDrawEvent
import gg.skytils.event.impl.world.BlockStateUpdateEvent
import gg.skytils.event.register
import gg.skytils.skytilsmod.Skytils
import gg.skytils.skytilsmod.Skytils.mc
import gg.skytils.skytilsmod._event.PacketReceiveEvent
import gg.skytils.skytilsmod._event.PacketSendEvent
import gg.skytils.skytilsmod.events.impl.BlockChangeEvent
import gg.skytils.skytilsmod.utils.*
import net.minecraft.client.renderer.GlStateManager
import net.minecraft.init.Blocks
Expand All @@ -43,7 +43,7 @@ import java.awt.Color
import java.util.concurrent.ConcurrentHashMap
import kotlin.math.abs

object CHTreasureChestHelper :EventSubscriber {
object CHTreasureChestHelper : EventSubscriber {

var lastFoundChest = -1L
var found = 0
Expand All @@ -70,7 +70,7 @@ object CHTreasureChestHelper :EventSubscriber {
register(::onBlockChange)
}

fun onBlockChange(event: BlockChangeEvent) {
fun onBlockChange(event: BlockStateUpdateEvent) {
if (!Skytils.config.chTreasureHelper || mc.thePlayer == null || SBInfo.mode != SkyblockIsland.CrystalHollows.mode) return
if (((event.old.block == Blocks.air || event.old.block == Blocks.stone) && event.update.block == Blocks.chest)) {
printDevMessage("Distance ${event.pos} ${mc.thePlayer.getDistanceSq(event.pos)}", "chtreasure")
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion mod/src/main/resources/mixins.skytils.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"util.MixinChatStyle",
"util.MixinIChatComponentSerializer",
"util.MixinUtil",
"world.MixinChunk",
"world.MixinWorld"
],
"verbose": true,
Expand Down

0 comments on commit 254a9f2

Please sign in to comment.