diff --git a/dist/src/main/kotlin/kr/toxicity/hud/hud/HudImageElement.kt b/dist/src/main/kotlin/kr/toxicity/hud/hud/HudImageElement.kt index 7d31638..051cda3 100644 --- a/dist/src/main/kotlin/kr/toxicity/hud/hud/HudImageElement.kt +++ b/dist/src/main/kotlin/kr/toxicity/hud/hud/HudImageElement.kt @@ -20,7 +20,6 @@ import kotlin.math.roundToInt class HudImageElement(parent: HudImpl, private val imageLayout: ImageLayout, gui: GuiLocation, pixel: PixelLocation) { private val chars = run { - val hud = imageLayout.image val finalPixel = imageLayout.location + pixel val shader = HudShader( @@ -34,7 +33,7 @@ class HudImageElement(parent: HudImpl, private val imageLayout: ImageLayout, gui val negativeSpace = parent.getOrCreateSpace(-1) fun HudImage.toComponent(): ImageComponent { val list = ArrayList() - if (hud.listener != null) { + if (listener != null) { list.add(EMPTY_PIXEL_COMPONENT) } image.forEach { pair ->