Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emi/rei, Quicknav, livid and nukekubi head (eman boss head) fix #812

Merged

Conversation

LifeIsAParadox
Copy link
Member

@LifeIsAParadox LifeIsAParadox commented Jun 30, 2024

fixes #378, fixes #539, fixes #538, fixes #860

emi/rei fix

emi and rei are working again

Quicknav

The click behavior of the Quicknavbutton has been changed so that it is more like a button click. The button is therefore pressed for 0.25 seconds. This has the advantage that the button can be pressed again if an error occurs. Otherwise, everything is the same, i.e. if the container name is recognized, it remains pressed and cannot be pressed again.
A fade animation has also been added.
outs3

Livid

The logic of the livid code has been changed.
The system checks whether the current color is the same as the last found livid color. The initial color is detected after the first blindness effect + 2 seconds.
I also added the bounding box option for livid to make it easier to recognize the correct enemy. I changed default mob glow option to false by and bounding box option to true.
thanks to hysteria for testing stuff

nukekubi head fix

the heads are now highlighted correctly again (to-do: only highlight your boss heads and not others)
changed the highlight color to green
thanks to hysteria for testing stuff

Slottext: Half-Eaten Carrot Collection

added support for Half-Eaten Carrot collection for slottext

@LifeIsAParadox LifeIsAParadox added the reviews needed This PR needs reviews label Jun 30, 2024
@kevinthegreat1
Copy link
Collaborator

That’s 0.25 seconds, not 2.5 seconds. Also you might want to turn on keep simple blocks and classes in one line so you don’t get reformattings such as your QuickNavButton#appendClickableNarrations. https://github.com/skyblockermod/skyblocker/wiki/contribute#code-cleanup

@LifeIsAParadox
Copy link
Member Author

LifeIsAParadox commented Jun 30, 2024

yeah my bad I meant 0.25 and not 2.5. Corrected description

@kevinthegreat1
Copy link
Collaborator

I would change it to at lease 1 second for ppl with ping in the hundreds lol

@LifeIsAParadox
Copy link
Member Author

I get what you mean, but 1 second feels wrong. It looks weird. I chose 0.25 seconds because the key press feels best with that timing.

@AzureAaron AzureAaron added the bug Something isn't working label Jun 30, 2024
@kevinthegreat1 kevinthegreat1 added the bleeding edge This PR has been accepted into bleeding edge label Jul 1, 2024
@AzureAaron AzureAaron added the wip This PR is a work in progress label Jul 9, 2024
@kevinthegreat1
Copy link
Collaborator

This pr looks fine, why wip?

@LifeIsAParadox LifeIsAParadox mentioned this pull request Jul 22, 2024
@LifeIsAParadox LifeIsAParadox added merge conflicts This PR has merge conflicts that need solving. and removed wip This PR is a work in progress labels Jul 22, 2024
@LifeIsAParadox LifeIsAParadox removed the merge conflicts This PR has merge conflicts that need solving. label Jul 23, 2024
@LifeIsAParadox LifeIsAParadox changed the title Quicknav and livid fix emi/rei, Quicknav, livid and nukekubi head (eman boss head) fix Jul 23, 2024
kevinthegreat1
kevinthegreat1 previously approved these changes Jul 23, 2024
Comment on lines 79 to 89
if (!originLividFound) {
String lividName = LIVID_TO_FORMATTING.entrySet().stream()
.filter(entry -> entry.getValue() == color)
.map(Map.Entry::getKey)
.findFirst()
.orElse("unknown");
client.world.getPlayers().stream()
.filter(entity -> entity.getName().getString().equals(lividName))
.findFirst()
.ifPresent(entity -> lividID = entity.getId());
originLividFound = true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a bit confused. How does this work when livid changes color when it only runs on the first time?

Actually, this whole lividId thing seems kinda unnecessary since we're still checking the name and you could revert to the old names.contains check if you end up changing this.

Copy link
Member Author

Choose a reason for hiding this comment

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

The idea is to identify the original livid and use its ID to highlight the correct livid. The problem with the old variant is that the original Livid in M5 changes color, resulting in two Livids with the same color. Therefore, the only reliable identifier for the original Livid is its ID.

The code looks like that because i first need the livid name of the original livid and second go through all players in the area (in theory i could do 2 loops to get the info if you want it less confusing).

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see, I wasn't familiar with M5 mechanics. Thanks for clearing this up.

for (ItemStack armorItem : entity.getArmorItems()) {
// eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id for the nukekubi head,
// compare against it to exclusively find armorstands that are nukekubi heads
// get the texture of the nukekubi head item itself and compare it
String texture = ItemUtils.getHeadTexture(armorItem);

return texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0=");
armorfound |= texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0=");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Well, this is a stupid bug... (Perfect opportunity for stream api btw.)

SkyblockEvents.JOIN.register(NEURepoManager::load);
}

private static void load() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ideally, this could have a better name (and maybe javadoc) or else it's easy to think that this loads the neu repo.

@LifeIsAParadox LifeIsAParadox added merge me please Pull requests that are ready to merge and removed reviews needed This PR needs reviews labels Jul 23, 2024
@LifeIsAParadox LifeIsAParadox added reviews needed This PR needs reviews merge conflicts This PR has merge conflicts that need solving. and removed merge me please Pull requests that are ready to merge reviews needed This PR needs reviews merge conflicts This PR has merge conflicts that need solving. labels Jul 23, 2024
@LifeIsAParadox LifeIsAParadox added merge conflicts This PR has merge conflicts that need solving. and removed reviews needed This PR needs reviews labels Jul 26, 2024
@LifeIsAParadox LifeIsAParadox added reviews needed This PR needs reviews and removed merge conflicts This PR has merge conflicts that need solving. labels Jul 26, 2024
LifeIsAParadox and others added 11 commits July 26, 2024 15:09
The click behavior of the Quicknavbutton has been changed so that it is more like a button click. The button is therefore pressed for 2.5 seconds. This has the advantage that the button can be pressed again if an error occurs. Otherwise, everything is the same, i.e. if the container name is recognized, it remains pressed and cannot be pressed again.
A fade animation has also been added.
The logic of the livid code has been changed.
The system checks whether the current color is the same as the last found livid color. The initial color is detected after the first blindness effect + 2 seconds.
I also added the bounding box option for livid to make it easier to recognize the correct enemy. I changed default mob glow option to false by and bounding box option to true.
I didnt get working the hovertext for quicknav because of the z height. stupid z height. I will look into that after my im back from my trip.
thx to nea and vic we have our recipes back

Co-Authored-By: viciscat <51047087+viciscat@users.noreply.github.com>
Co-Authored-By: Linnea Gräf <nea@nea.moe>
now it will only highlight the correct livid also after the "change"
add "Half-Eaten Carrot" Collection support
im not good at naming methods. like Minato naming jutsus
@LifeIsAParadox LifeIsAParadox added merge me please Pull requests that are ready to merge and removed reviews needed This PR needs reviews labels Jul 26, 2024
@kevinthegreat1 kevinthegreat1 merged commit 8288c1b into SkyblockerMod:master Jul 26, 2024
1 check passed
@LifeIsAParadox LifeIsAParadox removed the merge me please Pull requests that are ready to merge label Jul 26, 2024
kevinthegreat1 added a commit that referenced this pull request Jul 26, 2024
emi/rei, Quicknav, livid and nukekubi head (eman boss head) fix

(cherry picked from commit 8288c1b)
@LifeIsAParadox LifeIsAParadox mentioned this pull request Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bleeding edge This PR has been accepted into bleeding edge bug Something isn't working
Projects
None yet
3 participants