diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-09-17 09:39:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 09:39:08 +0200 |
commit | 5cba1329e720553854e79557815cdf9319768850 (patch) | |
tree | 94462a090e6748907d5f7019f64a2fc6166e6e27 /src/main/java/at | |
parent | fe59a3143b0b8a181869c5f11b5c869b6ea7c225 (diff) | |
download | skyhanni-5cba1329e720553854e79557815cdf9319768850.tar.gz skyhanni-5cba1329e720553854e79557815cdf9319768850.tar.bz2 skyhanni-5cba1329e720553854e79557815cdf9319768850.zip |
Fix: Baby Zombie Carnival Size (#2518)
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalZombieShootout.kt | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalZombieShootout.kt b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalZombieShootout.kt index 79e93f2ad..23e7b9ee4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalZombieShootout.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalZombieShootout.kt @@ -23,7 +23,6 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.entity.monster.EntityZombie import net.minecraft.init.Blocks import net.minecraft.item.ItemStack -import net.minecraft.util.AxisAlignedBB import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.awt.Color import kotlin.time.Duration.Companion.seconds @@ -98,19 +97,11 @@ object CarnivalZombieShootout { val entity = EntityUtils.getEntityByID(zombie.entityId) ?: continue val isSmall = (entity as? EntityZombie)?.isChild ?: false - val boundingBox = entity.entityBoundingBox.let { - if (isSmall) { - val widthScale = 0.5 - val heightScale = 0.85 - val newMin = it.minX + (it.maxX - it.minX) * (1 - widthScale) / 2 - val newMax = it.maxX - (it.maxX - it.minX) * (1 - widthScale) / 2 - val newHeight = it.minY + (it.maxY - it.minY) * heightScale / 1.75 - AxisAlignedBB(newMin, it.minY, it.minZ, newMax, newHeight, it.maxZ) - } else it - }.expand(0.1, 0.05, 0.0).offset(0.0, 0.05, 0.0) + val boundingBox = if (isSmall) entity.entityBoundingBox.expand(0.0, -0.4, 0.0).offset(0.0, -0.4, 0.0) + else entity.entityBoundingBox event.drawHitbox( - boundingBox, + boundingBox.expand(0.1, 0.05, 0.0).offset(0.0, 0.05, 0.0), lineWidth = 3, type.color, depth = false, |