diff --git a/dist/src/main/kotlin/kr/toxicity/healthbar/layout/ImageLayoutImpl.kt b/dist/src/main/kotlin/kr/toxicity/healthbar/layout/ImageLayoutImpl.kt index f2957e6..25bb53e 100644 --- a/dist/src/main/kotlin/kr/toxicity/healthbar/layout/ImageLayoutImpl.kt +++ b/dist/src/main/kotlin/kr/toxicity/healthbar/layout/ImageLayoutImpl.kt @@ -47,10 +47,10 @@ class ImageLayoutImpl( } val newHeight = (it.image.image.height.toDouble() * scale()).roundToInt() val div = newHeight.toDouble() / it.image.image.height.toDouble() - for (i in (0.. - val component = (parent.index++).parseChar() + val component = parent.index++.parseChar() jsonArray.add(JsonObject().apply { addProperty("type", "bitmap") addProperty("file", "$NAMESPACE:$dir") @@ -100,7 +100,7 @@ class ImageLayoutImpl( val list = if (listen >= 0) { components[(listen * components.lastIndex).roundToInt().coerceAtMost(components.lastIndex)] } else { - components[(next++) % components.size] + components[next++ % components.size] } return list[count.coerceAtMost(list.lastIndex)] } diff --git a/dist/src/main/kotlin/kr/toxicity/healthbar/layout/TextLayoutImpl.kt b/dist/src/main/kotlin/kr/toxicity/healthbar/layout/TextLayoutImpl.kt index 3c69b28..ee2fb1f 100644 --- a/dist/src/main/kotlin/kr/toxicity/healthbar/layout/TextLayoutImpl.kt +++ b/dist/src/main/kotlin/kr/toxicity/healthbar/layout/TextLayoutImpl.kt @@ -74,7 +74,7 @@ class TextLayoutImpl( } val map = HashMap() - for (i in (0.. + for (i in -8192..8192) { addProperty((ADVENTURE_START_INT + i).parseChar(), i) } }) diff --git a/dist/src/main/kotlin/kr/toxicity/healthbar/util/Entities.kt b/dist/src/main/kotlin/kr/toxicity/healthbar/util/Entities.kt index 1699b4b..1ebc587 100644 --- a/dist/src/main/kotlin/kr/toxicity/healthbar/util/Entities.kt +++ b/dist/src/main/kotlin/kr/toxicity/healthbar/util/Entities.kt @@ -19,7 +19,7 @@ fun HealthBarCreateEvent.createEntity(component: WidthComponent, layer: Int = 0) return PLUGIN.nms().createTextDisplay(player.player(), toEntityLocation(), component.component.build()).apply { val scale = healthBar.scale() transformation( - Vector(0.0, if (ConfigManagerImpl.useCoreShaders()) -(1 - scale.y) * 8192 / 40 else 0.0, (layer.toDouble()) / 4000), + Vector(0.0, if (ConfigManagerImpl.useCoreShaders()) -(1 - scale.y) * 8192 / 40 else 0.0, layer.toDouble() / 4000), scale ) } diff --git a/dist/src/main/kotlin/kr/toxicity/healthbar/util/Images.kt b/dist/src/main/kotlin/kr/toxicity/healthbar/util/Images.kt index 2f852c0..cd337c2 100644 --- a/dist/src/main/kotlin/kr/toxicity/healthbar/util/Images.kt +++ b/dist/src/main/kotlin/kr/toxicity/healthbar/util/Images.kt @@ -91,7 +91,7 @@ fun BufferedImage.withOpacity(opacity: Int): BufferedImage { for (i2 in 0.. 0) (rgba and 0xFFFFFF) else ENCODE_COLOR)) + it.setRGB(i1, i2, alpha or if ((rgba shr 24) and 0xFF > 0) rgba and 0xFFFFFF else ENCODE_COLOR) } } }