#Chocolate Factory Helper & Egg Finder

1800 messages · Page 2 of 2 (latest)

celest birch
#

or the eggs

spring light
#

Why not both

celest birch
#

well if they're preknown locations

#

its chill

#

if its detecting something behind the wall I couldnt know otherwise 💀

spring light
#

Eggs have fixed locations they can spawn on, yes

celest birch
#

but ur not showing me the fixed locations

spring light
#

The egg finder just listens to entity changes to detect them regardless of the location

celest birch
#

ur telling me where the egg is exactly

#

instead of telling me where it could be

#

which i cant know without the mod

#

which is sus

sullen breach
#

I mean the most "cheaty" thing in Skyblocker is the mob glow when the library gets the math wrong

celest birch
#

hypixel is always funni over what they allow and ban though

spring light
#

That's way too much effort for a downgrade to just make it safer

sullen breach
#

the solution to that was adding a warning..... (I wanted to remove it for mobs)

valid stirrup
#

well once you have seen it you know where it is, wall or not
but having it through wall without having seen is, indeed feel like a big ESP

spring light
#

It is a big ESP in a way

sullen breach
#

I just did what people suggested on the PR

#

¯_(ツ)_/¯

celest birch
#

idek what the mob glow could mess up on

valid stirrup
#

dungeonrooms rewrote the whole thing to do raycasts and finding patterns of blocks instead of scanning the roof to find the rooms just so it wouldn't be cheaty
in the end, you have exactly the same result, but it's 100% safe

sullen breach
#

Skyblocker just scans the rooms blocks

red bronze
#

honestly eggs "esp" is still less cheaty than some 1.8 mods

valid stirrup
# red bronze isn't raycast more expensive?

Dungeon Rooms Mod’s Secret Waypoints follows the general interpretation of Hypixel’s rules, does not modify packets in any way, and is most likely not bannable, but as with all mods, it is use at your own risk. Read the full post for more details.

DRM v3.0 entirely relies on a combination of raytracing (to get visible blocks within FOV), the hotbar map, the player’s coordinates, and a ton of math to detect rooms and place waypoints. Read the full post for more details.

valid stirrup
celest birch
#

DRM rewrote it to get out of the grey area.
Id say this egg is deep in the dark grey 🤷‍♂️

Especially with the patchnotes stating they added more spawn locations cause it was too easy in the CN

valid stirrup
#

when we scan for entities that the players can't see / hijack the packets to find the info, we gather info the player isn't supposed to have, just how it used to scan the roof of the dungeon

celest birch
#

( @spring light it is an awesome feature btw I dont wanna lose that point)

valid stirrup
#

displaying invisible entities
i feel like out egg ESP is doing this

red bronze
#

I love that egg "I swear this is still not hacks" thing

#

I mean we can just reduce range on that thing

#

or/and cast rays if you really want to take some fps

spring light
#

I could write a distanceSquared comparison to the player location upon packet receive, sure

red bronze
#

When I see all 3 eggs at /warp cn, I have no issue with it

#

When I see all 3 eggs in 8 chunks distance at /warp drag, it is kinda cheaty

spring light
#

Raycasts would be hard to implement without a big rewrite though, as the packet is only received once

celest birch
#

a prox check would also break then

spring light
#

And I think it wouldn't make sense to schedule it on 1 tick to check if it's visible until the egg changes

valid stirrup
spring light
celest birch
#

Im definitely not advocating for a raycast

spring light
#

Anyway I'll have to continue this convo later as I have to sleep now

celest birch
#

thats just asking for -fps for no real reason

red bronze
spring light
#

Got an exam in 10 hours and I have to sleep and study

sullen breach
#

gl

celest birch
#

GL Sir ❤️ @spring light

sullen breach
#

ill merge cf 2 for you though

red bronze
#

I also don't want raycast. If I want something with rays I would go play raytracing minecraft bugrock

spring light
valid stirrup
# celest birch Im definitely not advocating for a raycast

neither am i but then i'm advocating for marketing us as a cheat client and starting to add paid features 🙂 /hj
the problem if we stay in grey area is that we will end up getting bonked by hypixel and we will have to remove or change stuff in a short period of time or die

sullen breach
#

I mean we have a lot of things that may be useful to them like room matching

valid stirrup
#

but the longer we stay with sus code, the more risky it gets

sullen breach
#

I don't endorse it but I also don't really care as long as I dont receive bug reports about those forks

valid stirrup
acoustic sinew
valid stirrup
celest birch
#

cheat devs are known for being honourable YEP

valid stirrup
sullen breach
#

@spring light I don't think we need this rn but since you seemed interested:

We could create our own enum which implements TemporalUnit to allow the java.time APIs to work with things like mc ticks and sb time.

acoustic sinew
#

i did look at some point if there was a way to extend/implement Calendar but couldn't find anything

#

but temporal unit seems neat

valid stirrup
#

@spring light the off by one error is still there...
and now it got merged
for (byte i = STRAY_RABBIT_START; i < STRAY_RABBIT_END; i++)
is missing the =

#

also i think golden rabbits won't be matched as stray rabbits
but it also mean we have a chance to fix it and also highlight them in a different color

celest birch
#

There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.

spring light
#

Mood

red bronze
#

once again, getting info on all 3 eggs in cn is fine - those are all cramped in same spots anyway

but same thing in the End is a bit hacks. Those are sparse and you shouldn't be able to know that egg is 8 chunks away behind a wall

spring light
#

More broken stuff, great

#

(For context, the time tower calculations in my cf solver use the timer tower's level to figure out the multiplier since it's 0.1x per level)

sullen breach
#

I would hope it’s also shown in the time tower tooltip itself but I can’t check that

gleaming moth
#

Give me a week or two and I'll probably have earned enough spending chocolate that I can check

spring light
valid stirrup
valid stirrup
#

i should really upstream part of it

spring light
#

If it's not shown on the lore

#

Do you just calculate it upon activation or check the cocoa bean item and set a boolean or something

valid stirrup
#

It says 2.2x in there

#

For 1.5x + 0.7x

spring light
#

Oh, that's great then

#

Should be easy for me to fix as well

valid stirrup
#

Well yeah and that allow you to yeet your roman numeral thing

spring light
#

I kinda need it for other stuff so I moved it out to its own class

#

In the tooltips refactor

#

Enchant levels, minion levels etc.

valid stirrup
#

Fine ig

valid stirrup
#

Because no pattern regex stuff needed

spring light
valid stirrup
#

You have never looked at the NBT ?

spring light
#

I never thought of it

valid stirrup
#

NBT is where they have most stuff

spring light
#

Until rancher's boot slot numbers

#

And it still didn't occur to me to do it on others as well

#

Probably because that method failed on it and I had to go back to using the lore on that one

valid stirrup
#

We should always use NBT/Components first and only rely on parsing tooltip if there's no other way

spring light
#

I often dump the nbt to make sure the lore matches but never bothered to look at other components lmao

#

I even have a mod-let for it that I made to dump hovered item's nbt in chat with prettyprinting

#

Yeah I should revisit a lot of stuff and see if nbt could be used

valid stirrup
spring light
#

Yeah, even in that case I only looked at the lore lmao

spring light
#

I wonder if it's worth trusting hypixel to follow that pattern on all minions though

spring light
#

Honestly, for minion level it's easier to just get the name and check the roman numeral at the end

valid stirrup
spring light
#

I'd argue it's literally the same

#

You would still need to parse the last few letters

valid stirrup
#

ig you'll need to profile too

#

🙂

spring light
#

Not really, it's such a small operation that it's probably not worth the effort

valid stirrup
#

also doesn't it exist a settings to disable roman number on skyblock

spring light
#

I think that's from the 1.8 mods

valid stirrup
#

it's just for skills

#

tho i could easily see them do it for everything

spring light
#

Yeah that breaks my skill number parsing

#

And skills don't have nbt for the level

valid stirrup
spring light
valid stirrup
#

XD

spring light
#

Interesting enough, for catacombs it's always latin numerals

valid stirrup
#

anyway i would say parsing from NBT is better anyway because less likely to change

#

also since they are actually localizing skyblock, maybe a language could have left to right or smth and thus fail cause number not at the same place

spring light
#

There's such a thing??

#

Is that a WIP thing

valid stirrup
#

i mean i know there's localization

#

you can do /lang

#

ex : it keep trying to swap me to fr on alpha

#

and each time i had to say no

spring light
#

Isn't that for other gamemodes though

valid stirrup
#

but they fixed it and now respect i want to use english

spring light
#

I thought skyblock was fixed to en

valid stirrup
#

it works on skyblock

#

but not on every item

#

which is, yes, a mess

spring light
#

Ngl I don't see a difference after changing my lang setting

#

Did /lang tr and not a single thing changed

valid stirrup
#

and toss items on the ground to update them

#

also not all languages are supported

spring light
#

Still, nothing seems to be different

#

I only noticed the cooldown message change

#

And that's only half of it

valid stirrup
#

i know some other things do work and it was annoying, but don't remember which

valid stirrup
#

lemme try when i come home

#

mmmmmhhhh
maybe they fixed it
it was annoying cause items in different languages wouldn't stack
cause i think the translation was in the NBT and not done when sending data to the client

#

AHA knew it
they still do exist

spring light
#

Interesting

#

Btw why are all your tooltips at x 0 y 0

valid stirrup
#

allow me to always know where to look

valid stirrup
#

COMMUN PIOCHE

#

so yeah don't use tooltip content if you can avoid it

spring light
#

Wait so all the regex I've written so far has a chance of becoming obsolete?

valid stirrup
#

if they actually localize the game, it could break all things that depend on tooltips

spring light
#

Actually there's an easy way to fix all of it

valid stirrup
#

use NBT

spring light
#

This mod needs your hypixel language to be set to english!

valid stirrup
#

LMAO

spring light
#

Like tab stuff that check the playerlist

#

And every screen-dependant thing will break as the title will change

valid stirrup
#

that's why we need hypixel to use the custom packet channel more

#

and put more stuff in NBT

sullen breach
#

Skyblock itself isn’t really translated

#

So requiring English only is fine

#

otherwise regexes get big, need frequent modifications, and the performance of it drops a lot

spring light
#

I mean, the regex wouldn't change much

#

We'd just get the language somehow and switch (language) on every use of matchers

#

But who would be the one making regexes for all languages is something beyond me

red bronze
valid stirrup
#

anyway the TL;DR is don't depend on tooltips if you can gather infos from a better source like NBT/Components

acoustic sinew
valid stirrup
#

well they do put many things

#

just not everything

acoustic sinew
spring light
#

/party commands' feedback is localized

#

So it might break some regexps

manic walrus
#

the cost per CPS calculation for employees is a bit off
it doesn't account for your multiplier whereas the coach calculation accounts for current production

acoustic sinew
#

multiply it in your head

manic walrus
#

it's just 3653625 / 7 = 521946.4
but for example my multiplier currently is 3.961
so the CPS increase would be 27.727 instead
=> cost per CPS is 131771.37

manic walrus
#

it's not just nice to have info

acoustic sinew
#

so it won't affect the best upgrade

manic walrus
# acoustic sinew pretty sure it don't. If you take 3 positive real numbers `a`, `b`, and `c` with...

i don't really understand what you're trying to tell me with your comparisons but:
upgrading any of the employees only accounts for the raw cps and not raw cps multiplied by your multiplier for actual cps gain
so upgrading the rabbit dog for example would in my case increase my cps by 27.727 which in return is "only" a cost of 131,771 per cps
instead it's highlighting the coach jackrabbit for me at 18,000,000 for a +0.01x gain which is only 36.1 cps increase

#

3,653,625 for 27.727 CPS
definitely is cheaper and better than
18,000,000 for 36.1 CPS

acoustic sinew
#

eh maybe i dunno i'm too tired to think

#

ask Rime they're the one that made that helper

manic walrus
#

that's why i'm saying it here, feedback of something to check/ fix
or would it be better to open a support thread?

sullen breach
#

here is ok

#

@spring light so u see this

valid stirrup
#

TL;DR since we use the raw CPS gain for the coach rabbit, it's the same

#

if we had used the actual CPS gain for the coach, you would be right that we would need to use actual CPS for workers too

#

yes things need to be normalized, but dw they are

#

but i'll redo the big math tmr

manic walrus
#

but you already are using the "actual cps" for the coach since the coach multiplier is not multiplied by anything else anymore
only the employees are multiplied which in return means the current calculations favor the coach

but yeah, please check it again when you have time, maybe i'm not seeing something atm

valid stirrup
#

we are normalizing the coach

#

we are getting the raw cps based on the multiplier

manic walrus
#

and that's all the coach does, raw cps * 0.01
it does not increase with any other multiplier

valid stirrup
#

if you wanna check that our thing is right, compare it with skyhelper and you'll see that it actually show the same recommended order as us

spring light
#

The formula for calculating coach cps to compare against other rabbits rn is this:
totalCps / totalCpsMultiplier * (cpsMultiplierAfterUpgrade - currentCpsMultiplier)

#

So it calculates the cps increase based on the current cps without multipliers

manic walrus
#

but that is all the coach does

#

it does not normalize since that's already the max for the coach

spring light
#

Actually I get what you mean now

#

We should be multiplying the cps from the other rabbits with the total cps multiplier

manic walrus
#

a couple screenshots if anyone needs clarification

spring light
#

The issue here is that the coach cps factor we get is literally the increase in total cps while other rabbits' cps factors are calculated without the multiplier so it's less than the increase in total cps they would result in

valid stirrup
manic walrus
valid stirrup
#

it's past midnight i'll sleep on it and see tmr

#

not a great idea doing math rn tbh

spring light
#

The math rn is indeed skewed

#

But the result is that it recommends the coach more often than it should

#

It's not too big of an issue

manic walrus
#

Rabbit dog calculation:
4,441,005 / 7 = 634,429.3
=> but the actual CPS gain with my current multiplier of 3.961 would be 27.727
which means the actual cost is 4,441,005 / 27.727 = 160,168.97

Coach calculation:
18,000,000 / ((895 + 40 + 2785) * 0.01) = 483,870.97
since the coach does not get any other multiplier after buying it stays at that price & increase
CPS gain for calculation = 37.2 and stays after purchase

valid stirrup
spring light
#

But you can't buy that many levels of the coach anyway

valid stirrup
spring light
#

Anyway, the fix is really simple as there's already a variable holding the total cps multiplier

valid stirrup
#

tho it only matter at high levels and at high level you'll need coach 20 anyway

spring light
#

So I can just multiply the cps increase with that

manic walrus
spring light
#

Done

sullen breach
#

“A couple chocolate factory fixes” xD

valid stirrup
#

technically if we wanted to nitpick and get the true best calculations we could have to actually account for the fact time passes and while you are waiting on a big upgrade you could have bought multiple small ones that would have slightly increased the efficiency of smaller things so actually the more costly options are even worse than they can be but doing that calculation require to know the cost of every upgrade beforehand to be able to calculate that time deviation, anyway micro-optimization that yes i kinda stole from someone that was explaining algorithms to calculate the best cookie clicker upgrade on reddit, i need sleep i have an exam tmr pls kill me also good job Nia for noticing the issue and sorry for being dumb also did i say i need to sleep and maybe that i should stop writing...

manic walrus
#

all good :3
sorry for keeping you up so late, gngn 5909_SayoriSleep also gl with your exam!

spring light
#

Gn raptor

winter canyon
#

guys it cookie clicker

#

we will all max it out at a certain point

#

even if it’s slightly under the best optimal path it is still fine

#

spend that time working on other features, sleeping, and going out don’t lose ur mind in cookie clicker

celest birch
#

I found this weird substance on my"going out' travels too! Is this the famous grass?

#

But actually seriously do make sure you don't get lost in the sauce when ur programming stuff

valid stirrup
valid stirrup
#

when you think everything is fine but then god said :
(just my patch doing funsies)

manic walrus
#

the best upgrade calculation now doesn't check if the multiplier is affected by time tower, but we can just say that's a feature Giggle

spring light
#

But there's no factual way of calculating that as it simply depends on whether the user uses it right

valid stirrup
spring light
#

Too much effort for something that is likely to be inaccurate

#

Might as well train a neural network with the nonexistent data we have on sb players' time tower activation patterns

valid stirrup
#

it will be as inaccurate as the player is inneficient

#

i mean it works rn

#

but i strive for more

spring light
#

We could perhaps display the amount of chocolate gained in the following hour by the extra cps the tower adds?

#

It's not comparable so there won't be highlights for it but the user can see the data and make an informed choice

manic walrus
# spring light It never did

i worded that in a bad way:
when the time tower is activated it will add that multiplier to upgrading employees and prefer those over the jackrabbit, even though in theory jackrabbit is better

celest birch
#

evens out the jackrabbit being favoured when its not on

spring light
#

Well, at that time it is indeed better than jackrabbit so there's nothing wrong there

atomic portal
#

i would like to suggest compacting the CF tooltips

#

reducing this to say, just
name/level
the gain in CPS
and the cost

#

cause rn the tooltip blocks the entire GUI which is supser annoying

spark igloo
spring light
#

Did somebody send a ghost message

#

I had a notification but nothing new here

valid stirrup
red bronze
#

I'm surprised there is no calc for how long it will take til you can afford item in the shop

#

unless there is and my edge is not edging

valid stirrup
#

there will be in mine when it stop crashing

sullen breach
#

hm sm1 posted this ss somewhere

#

maybe an overview would be good in the future

spring light
#

The other way to do it is to save them locally as they're found/bought
But to do it retroactively would require the user to flip through 17 pages

sullen breach
#

I just imagined implementing this via chat + menu scanning

#

could use the api for the first time, and provide some resync thing like in museum cache in api-changes branch

spring light
#

Perhaps get from api on login, cache until next reboot and save them on memory as they are found/bought

sullen breach
#

they released the chocolate factory api very fast luckily

spring light
#

I kinda wonder how much space it will take on memory though

#

Name+rarity for 457 rabbits

#

I think this can go to the tooltip of hoppity's collection item

sullen breach
#

prob ye

spring light
#

Uhh, what do we do for the api key stuff again?

sullen breach
spring light
#

I was assuming the cf data is under profile

#

And that needs an api key to retrieve

sullen breach
sullen breach
#

the mod provides the api proxied so you don't need a key, but in a few weeks it will require a custom token to be sent for proof of identity

#

(api-changes branch sends that)

#

its under profile.events.easter.rabbits

celest birch
#

Is the plan to obfuscate the mod to hide the key or smthn?

sullen breach
#

no we aren't shipping the api keys with the mod

#

that would be very dangerous

celest birch
#

Ur not allowed to make users generate hypixel API keys

sullen breach
#

we aren't generating api keys for users

#

the mod will talk to the api server to get a custom api token thats tied to their acct and is valid for an hour, and then it refreshes it

spring light
#

Was the api being abused or something?

sullen breach
#

I have no clue, but it was sending like 10k queries a day which is a lot for the scale of our mod rn

#

either way the problem will be solved soon

celest birch
#

I don't think its allowed to have users put in their own dev keys though

sullen breach
#

nobody is putting any api key into skyblocker

spring light
celest birch
#

But isn't that what the mod hits?

sullen breach
#

indirectly

#

Mod -> hysky -> my api -> hypixel api

#

my api has the hypixel api key

celest birch
#

But why would I need a hypixel API key

spring light
#

This change enforces the api calls to be only made from skyblocker mod rather than changing anything going onto hypixel if I understood correctly

sullen breach
#

because you can't generate a skyblocker api token from your web browser, you have to be in game

celest birch
#

oh u just mean that

celest birch
#

i cant postman

#

hysky anymore

#

and that id have to hit hypickle directly with my own dev key for data preview

sullen breach
#

ye

celest birch
#

got ya

spring light
#

Do tokens get invalidated upon logging out of the game?

sullen breach
#

u can use this anywhere

#

in a few weeks it will return error 403 without the tokens

celest birch
#

just JWTing it?

#

or sessionIDing

sullen breach
sullen breach
#

they aren't saved locally anywhere

celest birch
#

JWTs are epic

#

fully self-contained, desrialisable and signed

sullen breach
#

yes, they're signed using an EC256 keypair

spring light
sullen breach
#

it uses the chat signing public keys as the mc acct verification

#

it stops people from being able to use it in non-mod contexts

#

there's no way 100% to know if it really is a skyblocker user or not if they spoof everything

spring light
#

On the other hand I found out that ProfileUtils already does what I needed, I just need to parse the json and display it

sullen breach
#

do note though that as of the api changes branch it no longer initializes when u start the game

spring light
#

This should be much easier than I thought

sullen breach
#

because that was really wasteful

#

so you will want to request it after the token request has completed

spring light
#

At the cost of not being able to merge until then

celest birch
#

Is it actually binded to a Minecraft account then ?

sullen breach
#

it will be merged shortly after 1.21 branch is, which should happen tomorrow hopefully if LIAP can do 1.20.6 release

spring light
#

All right

sullen breach
celest birch
#

Interesting

#

Would you not have the player uuid during launch?

#

To bind it to that instead? Or is part of the problem u think people playing other servers on their skyblock mod pack?

sullen breach
#

its available at launch but its initialized after the client has finished starting up

#

bc the profilekeys instance is not available at mod init

sullen breach
celest birch
#

Hypothetically

#

What's stopping me spoofing my id?

#

Chat signing key?

sullen breach
#

the chat signing public key signature

#

Mojang provides a signature composed of your uuid, public key, and keypair expiration date which is signed by their private key

#

to prevent spoofing a keypair by stealing it, we sign some random data with the private key and send that data to the server which uses ur public key to verify signature

celest birch
#

It's not signed by the server?

sullen breach
#

you can spoof the mc ver or the mod ver, the server ignores those rn bc no use

sullen breach
sullen breach
#

its signed by the private key from your chat signing keypair

#

and in order to get any of that info, u need to contact the mc services api run by mojang which generates all of that for u

#

so yeah u can't spoof an account you don't own at the very least

spring light
#

Would it make sense to create a callback event for token info retrieval?

sullen breach
#

just make sure u fire it on the render thread or add documentation that its fired off thread

spring light
celest birch
#

Didn't want to see some funny script kiddy get someone banned from skyblockers API

sullen breach
celest birch
#

That's cool

#

Just keep the logger the hell out of that class haha

sullen breach
#

sorry no can do

#

we have to log exceptions

celest birch
#

Ikik

#

Honestly

#

Probs should make it a library

sullen breach
#

idk seems small

celest birch
#

External repo to make it harder to slip things in

sullen breach
#

wdym slip things in

celest birch
#

Someone carelessly not reading every line in say a 2.5k line or

#

Or not spotting an innocuous log line of an API response 🙂

#

And it allows reuse for u own mod easier

sullen breach
#

149 line file not too long

sullen breach
#

putting it in a library isn't the worst idea although I do not really wanna obfuscate the code or make it hard to read in case people are curious

celest birch
#

It wouldn't obfuscate it?

#

Acc TBf

#

I have no idea

sullen breach
#

by obfuscate I mean make it harder to understand/find

celest birch
#

Ctrl click

sullen breach
#

github

celest birch
#

Stick it in the readme lol

sullen breach
#

eh most ppl prob don't care

spring light
#

Hmm, no java object exists for hoppity.json

#

I have to parse it myself 😦

celest birch
#

Gonna make that CF PV page easy to copy and paste ur code into kek

#

I'm officially banning myself from doing anymore PR work though cause I got 3 active

spring light
#

Also since I'm already requesting cf info, I could set the base values in cf to those obtained from the api

celest birch
#

Nah

#

Rely on the screen surely

#

It's a better source of truth than a double cached API call

spring light
#

The api also includes collected_locations

#

So an egg collection helper could be done

sullen breach
#

yep

spring light
#

Do we have anything for profile changes that I can inject into?

#

I looked around and couldn't find anything, but you never know

spring light
#

Or maybe I can cache them based on profile uuid

spring light
#

How do we align stuff again

acoustic sinew
spring light
#

Yeah I should probably do something like that

#

For the other tooltips too

#

Like bz price and lbin are misaligned all the time

#

Forget it, too much effort

#

I'll just align them by hand for now, even though it'll still look like shit with a custom font

#

I need a 2 wide space character

#

Apparently there's a thin space unicode character

#

And it's the same width as a normal space in mc lmao

spring light
#

Spent 4 hours trying to find a solution

spring light
atomic portal
#

huh?

spring light
autumn yarrow
#

looks nice

acoustic sinew
spring light
#

I'm just bad at mixins

#

Anyway, it's a bit of a hack

lines.add(Text.empty()
              .append(Text.literal("@align(100)"))
              .append(Text.literal("NPC Sell Price:").formatted(Formatting.YELLOW)));
lines.add(Text.empty()
              .append(ItemTooltip.getCoinsMessage(TooltipInfoType.NPC.getData().get(internalID).getAsDouble(), stack.getCount())));```
#

Example ^

#

There might be better formats or methods to get the same job done but I quite like this and it was the only way that came to my mind anyway

#

Feels like java annotations

#

It just draws the next line next to the current line when the current line starts with @align(number), with the x position off-set by number pixels

valid stirrup
valid stirrup
#

also i personally dislike how stuff is aligned since we are not in excel, we are reading text

#

but it's just me

spring light
# acoustic sinew tf is @align ??

I made it up```java
@ModifyExpressionValue(method = "drawTooltip(Lnet/minecraft/client/font/TextRenderer;Ljava/util/List;Ljava/util/Optional;II)V", at = @At(value = "INVOKE", target = "Ljava/util/stream/Stream;collect(Ljava/util/stream/Collector;)Ljava/lang/Object;"))
private <R> R skyblocker$alignedTooltip(R original, @Local(argsOnly = true) List<Text> list) {
if (!Utils.isOnSkyblock()) return original;
List<TooltipComponent> result = new ArrayList<>();

for (int i = 0; i < list.size(); i++) {
    Text text = list.get(i);
    List<Text> siblings = text.getSiblings();
    if (siblings.size() >= 2) {
        String first = siblings.getFirst().getString();
        if (first.startsWith("@align(") && first.endsWith(")") && i + 1 < list.size()) {
            //Some sanity checks were skipped here for brevity. Should be made sure that the string is in the correct format.
            int x = Integer.parseInt(first.substring(7, first.length() - 1));
            siblings.removeFirst();
            result.add(new AlignedTooltipComponent(text.copy().asOrderedText(), x, list.get(i + 1).asOrderedText()));
            i++;
        } else {
            result.add(new OrderedTextTooltipComponent(text.asOrderedText()));
        }
    } else {
        result.add(new OrderedTextTooltipComponent(text.asOrderedText()));
    }
}

return (R) result;

}```

#

Basically a prefix to the current line to indicate that it should be merged with the next line with x offset

#

The @align part isn't displayed

autumn yarrow
# spring light Grrr

wouldnt it better if it displayed directly left of chocolate factory like the garden visitor thing

spring light
#

I'd need to make it movable or sth

valid stirrup
#

does it ?

#

i have an easier time identifying what the value is if it's close to the name

spring light
red bronze
#

minus all pvp shenanigans since we have none

spring light
#

But the other tooltip stuff was already aligned anyway, I just made the alignment more precise

red bronze
#

not sure about cf align (I probably don't care) but align in bin tip is neat

autumn yarrow
# autumn yarrow true forgot about emi

speaking of emi, we need to implement a workaround in the next versions for emi and rei so that users don't have to load singleplayer for the mod to work.

spring light
#

Does that happen in REI as well?

#

I've been using REI for a long time and never noticed it

valid stirrup
#

tbh if it was just me nothing would be aligned, but it's just me the thing that make sense if for prices to be aligned, but only because they are comparable
ex, idc about Obtained and Museum to be aligned with prices

autumn yarrow
#

yeah. Happened after hypxiels choco update

spring light
#

Huh

#

Interesting

valid stirrup
spring light
#

Oh, perhaps I never noticed because I use firmament as well

autumn yarrow
valid stirrup
#

no more hypixel funni moment not sending packets because they won't think following what a server is supposed to do is fun

valid stirrup
#

it's painful that us client-modders have to fix failures of the servers

spring light
#

@valid stirrup do you know if the stray rabbits found in the CF screen actually go into your barn?

valid stirrup
#

some do yes

spring light
#

Not all of them?

valid stirrup
#

yes

spring light
#

Does it simply depend on whether you have them or some other criteria?

valid stirrup
#

some do, some don't

valid stirrup
spring light
#

There are non-barn rabbits?

valid stirrup
#

yes

#

some stray rabbits are just not rabbits that join the barn

#

also some golden stray rabbits open the egg random screen

#

some other do other stuff

#

stray rabbits are a bit of an everything

spring light
#

Uhh, no idea how I can set them as found in the rabbit collection cache if that's so

#

Or nvm, I can cache the total rabbits and see if the counter is incremented in the lore

#

Update the rarity-based counter depending on the color of the rabbit too

celest birch
#

Are you displaying this off the CF screen?

valid stirrup
#

i mean just cache them when the user open the menu smh

spring light
celest birch
#

just use the barn then?

spring light
#

I could add it to the barn too

celest birch
#

I mean does the barn tooltip

#

not show u

#

the total number of rabbits?

spring light
#

Yes

valid stirrup
#

yeah add the detail there

spring light
#

That's where I added it

valid stirrup
spring light
valid stirrup
#

it's long but fine

celest birch
#

I'm probably misunderstanding the problem dw then

spring light
#

But this is only done on login

#

It has to be updated during runtime

celest birch
#

parse the chat messages

spring light
#

Speaking of which, does anybody have the "rabbit found" chat messages? I also need those

spring light
#

And those don't send chat messages

valid stirrup
spring light
#

That'd save me some effort

valid stirrup
#

tbh just don't care and update the API once in a while, it's fine /hj

spring light
#

It's cached by ProfileUtils and I don't want to get into that mess

#

Tho, I'll have to

celest birch
#

~~its updates every hour right? ~~ that was museum cache

#

so just use the chat msg

spring light
#

The bigger issue is that it doesn't support profile changes

#

At least not immediately

#

I'll have to change that to a map with <profile uuid, whatever it currently is>

celest birch
#

could add support that if they swap profile a new request is sent out

#

theres a chat msg u can hook into at least to do that

valid stirrup
celest birch
#

just make the local cache a map if thats a concern lol

#

but there's also a built in 15s hypixel swap cooldown

#

but if u want to stop spams that should be a 429 on the server anyway with retry on the client anyway

#

if people want to spam the API they can do it in smarter ways than swapping profile every 20s tho

valid stirrup
celest birch
#

that's why its cached by the proxy

valid stirrup
#

and if you cache it then it's your server that's gonna die

spring light
#

It's a chonky one too

#

Profiles by player uuid

#

Literally everything about your profiles and islandmates' profiles

celest birch
#

if that breaks the server

#

u got bigger problems

#

cause eh

#

thats literally what the PV does

#

and has to do

#

only without the 20s cooldown

sullen breach
spring light
spring light
#

But, should I?..

#

Would a grid tooltip be useful anywhere

sullen breach
#

to avoid conflicts

spring light
sullen breach
#

its unlikely a server will use that same syntax, but not impossible

sullen breach
spring light
#

I injected into Text instead

@Mixin(Text.class)
public abstract class TextMixin implements AlignedText {
    @Unique
    @Nullable
    private Text alignedWith = null;
    @Unique
    private int xOffset = Integer.MIN_VALUE;

    @Override
    public @NotNull Text alignWith(@NotNull Text text, int xOffset) {
        this.alignedWith = text;
        this.xOffset = xOffset;
        return text;
    }

    @Override
    public @Nullable Text getAlignedText() {
        return alignedWith;
    }

    @Override
    public int getXOffset() {
        return xOffset;
    }
}```
#

Since the alignedWith property is a text too, it can also have an alignedWith property

#

Allowing for a linked list of sorts

sullen breach
#

the only problem with that

spring light
#

Though it kinda makes it harder to add it to a list

sullen breach
#

its not good for mutable text chains with .append() and stuff

#

since you will need to cast back to MutableText

spring light
#

Why would you need that?

#

This worksjava for (RabbitRarity entry : RabbitRarity.entries) { Text main = Text.empty() .append(Text.literal(entry.toString()).formatted(entry.color)); main.alignWith(Text.empty() .append(Text.literal(String.valueOf(entry.getCollectedAmount())).formatted(Formatting.GREEN)) .append(Text.literal("/").formatted(Formatting.DARK_GRAY)) .append(Text.literal(String.valueOf(entry.getMaxAmount())).formatted(Formatting.GREEN)), 110)) lines.add(main); }

#

Just have to save it in a variable as alignWith returns the child text and adding that into the list would just make the last one render

sullen breach
#

if it works without it isn't the worst

spring light
#

That would have to be written as

Text tmp = Text.literal("this").withColor(0xFFFFFF);
tmp.alignWith(Text.empty());
//Do whatever with tmp
sullen breach
#

if we don't need it rn then don't bother

#

but maybe a future consideration

spring light
#

It would still work, just not very concise

spring light
#

Oh wait, I can't mixin into Text

#

Because it's an interface

#

And it works!

#

Except for the width calculation

#

I wonder if I can fix the graphs in the bz with this

#

With like 6 px space per character

#

But now that I think about it, AlignedText and MutableText.alignWith don't make much sense

#

What else could I name it though

sullen breach
#

your mixin just needs to be an interface

#

this ain't Forge

spring light
#

I don't use interfaces that often so idk how to work with them

#

All you need is class and abstract class

spring light
#

But aligning happens between 2 different rows

sullen breach
spring light
#

The method align would just append text at a certain x value

#

Width calculation fixed

#

Maybe I could keep a reference to the initial text object in the text objects, so that I can add a method to make the code cleaner

#

Like just .initial() at the end of the alignWith chain and remove the need for saving in variables and stuff

#

God I miss kotlin's scope functions

sullen breach
#

but maybe move it to mutable text?

#

I think Hypixel uses that exclusively

spring light
# sullen breach might be bad for memory leaks? unless I'm misunderstanding

Basically this

@Unique
// Technically @NotNull, it's supposed to be filled in by the first text in the chain
private MutableText firstOfChain = null;```
And then fill it with the first one when creating aligned text
```java
@Override
public @NotNull MutableText alignWith(@NotNull MutableText text, int xOffset) {
    this.alignedWith = text;
    this.xOffset = xOffset;
    if (firstOfChain == null) firstOfChain = (MutableText) (Object) this;
    return text;
}```
Then a getter method for it to simply do this:
```java
for (RabbitRarity entry : RabbitRarity.entries) {
    lines.add(Text.empty()
                  .append(Text.literal(entry.toString()).formatted(entry.color))
                  .alignWith(Text.empty()
                                 .append(Text.literal(String.valueOf(entry.getCollectedAmount())).formatted(Formatting.GREEN))
                                 .append(Text.literal("/").formatted(Formatting.DARK_GRAY))
                                 .append(Text.literal(String.valueOf(entry.getMaxAmount())).formatted(Formatting.GREEN)), 110)
                  .alignWith(Text.literal("Hey"), 50)
                  .alignWith(Text.literal("Hello"), 40).getFirstOfChain());
}```
#

Much better compared to the previous way:

MutableText main = Text.empty()
                       .append(Text.literal(entry.toString()).formatted(entry.color));
main.alignWith(Text.empty()
                   .append(Text.literal(String.valueOf(entry.getCollectedAmount())).formatted(Formatting.GREEN))
                   .append(Text.literal("/").formatted(Formatting.DARK_GRAY))
                   .append(Text.literal(String.valueOf(entry.getMaxAmount())).formatted(Formatting.GREEN)), 110)
    .alignWith(Text.literal("Hey"), 50)
    .alignWith(Text.literal("Hello"), 40);
lines.add(main);```
#

Idk if it'll cause a memory leak though

#

Or perhaps I could call it build

#

Or actually my current implementation would simply return the 2nd last one in the chain rather than the first

#

But anyway, the idea is the same

sullen breach
#

as long as the text refernece isnt held in a map or smth

#

thats a constant

spring light
#

I could also set the intermediate steps' firstOfchain to null to save more memory I guess

#

Or actually, I think the text object is saved by reference, so a null pointer and a text pointer would take the same amount of memory

sullen breach
#

doubt it really matters

spring light
#

Actually, I'll make 2 different methods

#

1 for chaining, 1 for single

spring light
#

Refactoring complete, and everything still works

#

Nice

spring light
#

Added support for profile changes along with an event for profile changes

#

Now all profiles of the user are cached rather than the selected one, and selectedness of a profile is handled with chat messages

#

Also the rabbit collection updates on new rabbits

#

I'm still not sure about the stray rabbits though

#

I did find out that the new rabbit message is sent for whether the source is chocolate eggs or buying directly from hoppity

#

So it might also apply to the stray rabbits if they are indeed added to the barn and send a chat message

reef patio
#

This thread has 1649 messages sent. Big number

spring light
#

We ramble a lot

atomic portal
spring light
spark igloo
#

if you use the profile id message, it should be fine in most if not all cases
"Your profile was changed to" should also show up pretty much always
"Switching to profile" doesn't always show

#

tab list is another way to get it but that only has the profile name, not the id (and the profile name in tab list is reversed while in the rift)

spring light
#

Also using this one

#

To ensure the currently selected one is correct

#

As the api might've been cached and sent the wrong one

#

One small thing, I didn't handle the case where the player might've used chat rules to remove them

valid stirrup
#

my slightly different color scheme
(i can't show golden stray rabbits because rare, but basically they are golden highlighted)

valid stirrup
#

@spring light we could add max chocolate in x time in this tooltip

#

would be pretty useful when people have the max prestige as all you care about is just generating chocolate and collecting before it's full

spring light
#

Could add it to the item name too

#

Like currentChoc/maxChoc

valid stirrup
#

eeeeeeeh

#

not fan of changing the item name

spring light
#

Well, it's just the first item in the list of text

valid stirrup
#

but ig could work

spring light
#

And it has 2 extra pixels distancing it from the lore

valid stirrup
#

also maybe actually show time until you can buy for the shop things

spring light
#

And that could go wrong easily

#

Like time tower running out, reaching max chocolate

valid stirrup
#

just use the value that is cached in the chocolate facroty helper

spring light
valid stirrup
#

we don't need that

spring light
#

Unless you meant a static counter that doesn't change

valid stirrup
#

just base it on the cached value

#

it's fine enough

spring light
#

I guess I could add it to items that your prestige is enough to buy & have stock

valid stirrup
#

@spring light i got 2 Golden Stray Rabbit yesterday and noticed they weren't highlighted
my code is slightly different as i highlight golden rabbits differently, but as upstream i had a start with with golden rabbits in caps
the names i got where theses ones, so IG instead of in all caps it should use this

"Golden Rabbit - Chocolate Mountain"
"Golden Rabbit - El Dorado"
.startsWith("Golden Rabbit - ")
acoustic sinew
#

why not just .contains("Golden Rabbit")

#

or startsWith if u want

valid stirrup
acoustic sinew
#

why include the -

valid stirrup
#

because they may still start with the thing without the dash when clicked

#

lemme look at my logs yesterday

#

iirc i had a good reason

valid stirrup
#
[01:17:28] [Render thread/INFO]: [STDOUT]: Unknown rabbit: 'Golden Rabbit - Chocolate Mountain'
[01:17:28] [Render thread/INFO]: [STDOUT]: Lore: 'Grants +18,766,248 Chocolate!  CLICK ME!'
[01:17:28] [Render thread/INFO]: [STDOUT]: Unknown rabbit: 'Golden Rabbit CAUGHT!'
[01:17:28] [Render thread/INFO]: [STDOUT]: Lore: 'You caught a stray Golden Rabbit!  You gained +18,766,248 Chocolate!'
#

also technically we could use contain click me

acoustic sinew
#

k

valid stirrup
#

but alr knowing the pattern if one day we want to improve the highlight like this which i think is better
basically i use different highlight colors so that if you see gold you get it's really important and you should click while when you see purple you know you should click but it's less important
(also ignore the stdout, i'm debuggin)

hard adder
#

I would love to have the location names with cords in chat : )

hard adder
#

like when you find the egg it tells you where is the egg is located .. for example in dugeon hub "top of the statue " , " top of the gate "

so it would be nice if the chat tells us the location of the egg alongside coordinates .
" found an egg at x,y,z (at the top of the statue)"

red bronze
#

it literally has waypoint at where you need to go

valid stirrup
#

@spring light when you get fish the rabbit as a stray rabbit, this happen

spring light
#

The rabbit collection just listens to chat for the new rabbit messages

spring light
#

Actually it's not fine

#

Apparently the api name for it is just fish, so neu repo also changed it to fish

#

And the current implementation just lowercases them and replaces spaces with _

#

So it'd be checking for fish_the_rabbit

#

I'll just assume it's fine to check them 1 by 1 as special cases

#

Actually just ignore my last 5 messages

#

I forgot I had changed it to not care about the specific rabbits

#

Because I had found out that I can just leave duplicate checking to hypixel

valid stirrup
valid stirrup
# spring light What is that useful for?

Actually knowing if the user has 7h or 8h cooldown on the tower
Technically i can know if the user has the rabbit that give the +0.7x buff to the tower in another way

spring light
#

Oh

#

Well, it shouldn't be hard to change the regex slightly and add a rabbit name check

#

Most of it is already available

reef patio
#

price / chps gained + max(price-bank),0)/curr chps
Is this a good way for best chocolate?

spring light
#

How does the 2nd part help?

#

If I'm understanding it correctly, that's basically seconds to get back the cost of the thing after buying said thing + seconds to buy the thing

reef patio
#

Ye so it is the best progress

spring light
reef patio
spring light
#

It's not particularly good

celest birch
#

top chocolate factory players

spring light
#

It's essentially what we do rn with the added values of how long until you can buy it

#

But if you can't buy it the other options are really close anyway, they don't change much between the 7 towers if you followed the best upgrade pattern from the start

spring light
#

Adding in the time until buy is available would just make it less convenient as you can't buy and close the menu, there's a waiting factor

valid stirrup
#

the current implementation of the algorithm is much simpler and very close to what you would actually get with the complex algorithm anyway

atomic portal
valid stirrup
atomic portal
#

ik its just a non issue here

celest birch
#

imagine saying your the Top of AFKing though

atomic portal
#

like genuinely its so pointless
the 'top chocolate factory players' arent gonna use this mod

valid stirrup
#

i mean technically the idea they say of a more better complex algorithm existing is right
but honestly i didn't wanted to bother coding it
(tho i think i actually have written it on some papers or smth)

atomic portal
#

or even then, if they do, they will just use 1.8.9 for one of those mod's "perfectly accurate best calculation" for when theyre doing cf

#

like genuinely its just a waste of time

valid stirrup
#

honestly for my account which is still CF 0 (that i keep for testing purposes) and for bingo it's not really a waste of time

reef patio
atomic portal
#

I'm shocked
but then even more reason lol, just use one of those for it?

reef patio
#
        val extra = (newAverageChocolate - averageChocolate).round(2)
        val effectiveCost = (upgradeCost!! / extra).round(2)

This is the best calculator in 1.8.9 for cf

valid stirrup
#

sure use the 1.8.9 if you want ultra-optimized CF as we likely won't implement it soon

valid stirrup
acoustic sinew
#

i was gonna do that but then got distracted by that github issue

#

i'm gonna go ahead and do that ding

spring light
acoustic sinew
#

they do but it's easy to miss

#

hence the "repeated"

valid stirrup
acoustic sinew
#

it's more of a pop

#

but they do do a sound

valid stirrup
#

I've literally never heard them making any sound

#

Maybe it's one of the sound that's usually so loud i've reduced it

#

Honestly i would say use smth like experience ding

#

Play it like once or thrice for normal strat rabbits

And like 5 or 7 times for golden ones

acoustic sinew
#

i just don't know what sound to put for golden

valid stirrup
#

Honestly if you miss strat rabbits it's fine

#

But golden one not

#

So that's why i was on the idea use the sound a bit for normal ones and infinitely for golden ones

spring light
#

Perhaps another sound then

#

Like amethyst

valid stirrup
#

I mean the thing is the ping sound is very nice to actually draw your attention
It's extremely simple so not really annoying

#

The more the sound is complex the worse it is imo

acoustic sinew
#

one of the other note block sounds? like snare maybe?

#

or hat

valid stirrup
#

@spring light i've found an issue with the egg finder
the current waypoint doesn't get cleared when you haven't taken an egg but the egg change place

acoustic sinew
#

bruh how was this not noticed sooner

#

we are too much of gamers

valid stirrup
#

btw i can't even do a screenshot cause i can't reach the place

#

i need an AOTE or a grappling hook and i don't have one

#

and i don't even have my photo mod freecam mod

#

zoomed in

spring light
#

I thought I had that fixed

valid stirrup
#

well

spring light
#

Perhaps it was the other packet that just changes location rather than spawn a new entity and set its data

#

But it was working too

valid stirrup
#

that works

#

however you need to be in the range of the new egg

#

which isn't the case on big islands

#

aka it should clear the same egg waypoint on message before discovering if a new one exist

spring light
#

Nvm I see what you mean now

valid stirrup
spring light
#

I guess I could re-add it but then idk how I could solve that other issue

valid stirrup
acoustic sinew
#

egg spawns before the chat message sometimes

spring light
#

Actually, I might have a solution

#

Dk how to describe it tho

#

Lemme try it out