Skip to content

Commit 19aa734

Browse files
author
benjilmao
committed
Added smolMe and made the smolpeople work on players only
1 parent a079d75 commit 19aa734

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/main/java/gg/skytils/skytilsmod/utils/SuperSecretSettings.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class SuperSecretSettings {
4545
public static boolean palworld = false;
4646
public static boolean sheepifyRebellion = false;
4747
public static boolean smolPeople = false;
48+
public static boolean smolMe = false;
4849
public static boolean tryItAndSee = false;
4950
public static boolean twilightGiant = false;
5051

@@ -115,6 +116,7 @@ public static void setSecrets() {
115116
palworld = settings.contains("palworld");
116117
sheepifyRebellion = settings.contains("sheepifyRebellion");
117118
smolPeople = settings.contains("smolpeople");
119+
smolMe = settings.contains("smolme");
118120
tryItAndSee = settings.contains("tryItAndSee");
119121
twilightGiant = settings.contains("twilightGiant");
120122
}

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,20 @@ 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+
4654
val isBreefing by lazy {
47-
entity.name == "Breefing" && (SuperSecretSettings.breefingDog || Random.nextInt(
48-
100
49-
) < 3)
55+
entity.name == "Breefing" && (SuperSecretSettings.breefingDog || Random.nextInt(100) < 3)
5056
}
5157

5258
val isSmol by lazy {
53-
Utils.inSkyblock && entity is EntityPlayer && (SuperSecretSettings.smolPeople || isBreefing)
59+
Utils.inSkyblock && entity is EntityPlayer && (SuperSecretSettings.smolPeople || (entity is EntityPlayerSP && SuperSecretSettings.smolMe) || isBreefing ) && !isNPC()
5460
}
5561

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

0 commit comments

Comments
 (0)