Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class SuperSecretSettings {
public static boolean palworld = false;
public static boolean sheepifyRebellion = false;
public static boolean smolPeople = false;
public static boolean smolMe = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider adding a comment here explaining what smolMe does. This will help others understand the purpose of this setting.

public static boolean tryItAndSee = false;
public static boolean twilightGiant = false;

Expand Down Expand Up @@ -115,6 +116,7 @@ public static void setSecrets() {
palworld = settings.contains("palworld");
sheepifyRebellion = settings.contains("sheepifyRebellion");
smolPeople = settings.contains("smolpeople");
smolMe = settings.contains("smolme");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider adding a comment here explaining what smolMe does. This will help others understand the purpose of this setting.

tryItAndSee = settings.contains("tryItAndSee");
twilightGiant = settings.contains("twilightGiant");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,20 @@ class EntityLivingBaseHook(val entity: EntityLivingBase) {
overrideDisplayName = s
}

private fun isNPC(): Boolean {
if (entity !is EntityPlayer) return true

return entity.hasCustomName() ||
entity.displayName.unformattedText.contains("♲") ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this check needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first thought while reading a doc was to have this check as a safety net to make sure smolpeople excludes npcs and mobs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I mean that specific line looking for the recycling symbol.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s supposed to be “§” because Ive seen somewhere that hypixel uses formatting codes on mob names, idk why is changes that to the recycling icon though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that works how you intend it to, players have colored names as well.

entity.uniqueID.version() != 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This checks the version of the UUID. What does version 4 signify, and why does a different version indicate an NPC? Consider adding a constant for 4 and a comment explaining its meaning.

        const val PLAYER_UUID_VERSION = 4
        return entity.hasCustomName() ||
                entity.displayName.unformattedText.contains("") ||
                entity.uniqueID.version() != PLAYER_UUID_VERSION // Players should have UUID version 4

}

val isBreefing by lazy {
entity.name == "Breefing" && (SuperSecretSettings.breefingDog || Random.nextInt(
100
) < 3)
entity.name == "Breefing" && (SuperSecretSettings.breefingDog || Random.nextInt(100) < 3)
}

val isSmol by lazy {
Utils.inSkyblock && entity is EntityPlayer && (SuperSecretSettings.smolPeople || isBreefing)
Utils.inSkyblock && entity is EntityPlayer && (SuperSecretSettings.smolPeople || (entity is EntityPlayerSP && SuperSecretSettings.smolMe) || isBreefing ) && !isNPC()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This logic is getting a bit complex. Consider extracting parts of this condition into well-named variables to improve readability. For example, val isSmolPeopleActive = SuperSecretSettings.smolPeople

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first guess is that the npc check is only needed when going down the smolme path so I'd rather have it moved there to slightly optimize the condition check a little.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at it now I could move it to smolpeople since EntityPlayerSP already excludes mobs and for smolme but I’ll have to test that when am home

}

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