Skip to content

Commit 648e6ed

Browse files
author
benjilmao
committed
Simplifying isSmol check by removing useless npc checks
1 parent 19aa734 commit 648e6ed

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/entity/EntityLivingBaseHook.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,14 @@ class EntityLivingBaseHook(val entity: EntityLivingBase) {
4343
overrideDisplayName = s
4444
}
4545

46-
private fun isNPC(): Boolean {
47-
if (entity !is EntityPlayer) return true
48-
49-
return entity.hasCustomName() ||
50-
entity.displayName.unformattedText.contains("") ||
51-
entity.uniqueID.version() != 4
52-
}
53-
5446
val isBreefing by lazy {
5547
entity.name == "Breefing" && (SuperSecretSettings.breefingDog || Random.nextInt(100) < 3)
5648
}
5749

5850
val isSmol by lazy {
59-
Utils.inSkyblock && entity is EntityPlayer && (SuperSecretSettings.smolPeople || (entity is EntityPlayerSP && SuperSecretSettings.smolMe) || isBreefing ) && !isNPC()
51+
Utils.inSkyblock && entity is EntityPlayer && (
52+
(entity is EntityPlayerSP && SuperSecretSettings.smolMe) ||
53+
(SuperSecretSettings.smolPeople && entity.uniqueID.version() == 4) || isBreefing)
6054
}
6155

6256
fun modifyPotionActive(potionId: Int, cir: CallbackInfoReturnable<Boolean>) {

0 commit comments

Comments
 (0)