#Chocolate Factory Helper & Egg Finder
1800 messages · Page 2 of 2 (latest)
Why not both
well if they're preknown locations
its chill
if its detecting something behind the wall I couldnt know otherwise 💀
Eggs have fixed locations they can spawn on, yes
but ur not showing me the fixed locations
The egg finder just listens to entity changes to detect them regardless of the location
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
I mean the most "cheaty" thing in Skyblocker is the mob glow when the library gets the math wrong
hypixel is always funni over what they allow and ban though
That's way too much effort for a downgrade to just make it safer
the solution to that was adding a warning..... (I wanted to remove it for mobs)
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
It is a big ESP in a way
idek what the mob glow could mess up on
not really
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
isn't raycast more expensive?
Thats drm, not skyblocker
Skyblocker just scans the rooms blocks
honestly eggs "esp" is still less cheaty than some 1.8 mods
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.
no but i mean with our entity scanning
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
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
( @spring light it is an awesome feature btw I dont wanna lose that point)
displaying invisible entities
i feel like out egg ESP is doing this
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
I could write a distanceSquared comparison to the player location upon packet receive, sure
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
Raycasts would be hard to implement without a big rewrite though, as the packet is only received once
a prox check would also break then
And I think it wouldn't make sense to schedule it on 1 tick to check if it's visible until the egg changes
this would be best, but wouldn't solve it
the only true way to solve is raycasting
or any other technique to detect what's in the FoV of the player
Now that I think about it, yeah sure
Im definitely not advocating for a raycast
Anyway I'll have to continue this convo later as I have to sleep now
thats just asking for -fps for no real reason
our goal is to make sure admins won't come here telling us to remove thing
Got an exam in 10 hours and I have to sleep and study
gl
GL Sir ❤️ @spring light
ill merge cf 2 for you though
I also don't want raycast. If I want something with rays I would go play raytracing minecraft bugrock
Appreciate it
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
I bet some of the early illegal mods will base themselves off of our code
I mean we have a lot of things that may be useful to them like room matching
indeed
that's what will happen
but it's not our problem
as long as we make it so we yeet grey code, we are fine
but the longer we stay with sus code, the more risky it gets
I don't endorse it but I also don't really care as long as I dont receive bug reports about those forks
well if they are smart they don't do forks, they will just yoink code
LGPL 3 belike:
"hey your mod should be highlighting every mob in a 2 mile radius but isn't what gives"
well yeah if our license is good we can bonk them
cheat devs are known for being honourable YEP
Trust me if you send them a cease and desist yes
@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.
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
@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
I forgor
There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.
Mood
may as well make different value per island
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
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)
Is the bonus only shown in the shop?
I would hope it’s also shown in the time tower tooltip itself but I can’t check that
Give me a week or two and I'll probably have earned enough spending chocolate that I can check
I hope so
it should break nothing if it's coded in a nice way
there is a better way to do that, iirc i fix it in my patch
i should really upstream part of it
How do you get the multiplier though?
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
It is tho
It says 2.2x in there
For 1.5x + 0.7x
Well yeah and that allow you to yeet your roman numeral thing
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.
Fine ig
But you can parse those in the NBT/components and it would be faster than parsing the lore
Because no pattern regex stuff needed
They keep that data in the nbt??
Obv
You have never looked at the NBT ?
I never thought of it
NBT is where they have most stuff
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
We should always use NBT/Components first and only rely on parsing tooltip if there's no other way
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
If you need NBT stuff for the CF, here it is
#1238199646975819837 message
Yeah, even in that case I only looked at the lore lmao
Hmm, the minion level in the nbt seems to be inside of the id, like id: "SNOW_GENERATOR_6"
I wonder if it's worth trusting hypixel to follow that pattern on all minions though
it is
Honestly, for minion level it's easier to just get the name and check the roman numeral at the end
yes but wouldn't it be slower ?
I'd argue it's literally the same
You would still need to parse the last few letters
Not really, it's such a small operation that it's probably not worth the effort
also doesn't it exist a settings to disable roman number on skyblock
I think that's from the 1.8 mods
then you have a bad regex
It's not a bad regex, but one that wasn't made with such a case in mind
XD
Interesting enough, for catacombs it's always latin numerals
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
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
Isn't that for other gamemodes though
but they fixed it and now respect i want to use english
I thought skyblock was fixed to en
nope
it works on skyblock
but not on every item
which is, yes, a mess
Ngl I don't see a difference after changing my lang setting
Did /lang tr and not a single thing changed
you need to reload
and toss items on the ground to update them
also not all languages are supported
Still, nothing seems to be different
I only noticed the cooldown message change
And that's only half of it
drop any vanilla item and pick it up, i know for sure these do work with localization
i know some other things do work and it was annoying, but don't remember which
Yeah nothing happens
weird
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
adaptative tooltips
it's a nice accessibility
allow me to always know where to look
localized enchants and abilities
COMMUN PIOCHE
so yeah don't use tooltip content if you can avoid it
Wait so all the regex I've written so far has a chance of becoming obsolete?
yes
if they actually localize the game, it could break all things that depend on tooltips
Actually there's an easy way to fix all of it
use NBT
This mod needs your hypixel language to be set to english!
LMAO
There are so many places where you have to use tooltip or just text components though
Like tab stuff that check the playerlist
And every screen-dependant thing will break as the title will change
that's why we need hypixel to use the custom packet channel more
and put more stuff in NBT
I agree
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
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
can we also make it use english in skyblocker by default until you go and swap language?
issue is the language does not apply just for skyblock so bad idea
anyway the TL;DR is don't depend on tooltips if you can gather infos from a better source like NBT/Components
could be cool if they put some things in NBT/Components/whatever, like enchants
btw i do wanna do this at some point, I don't really know how/where to check what language the g@m3r is using
ehm it's hard
This might need to be put in the description somewhere, actually
/party commands' feedback is localized
So it might break some regexps
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
multiply it in your head
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
but it also affects the highlight of what is best to upgrade
it's not just nice to have info
pretty sure it don't.
If you take 3 positive real numbers a, b, and c with a < b, and c and b non-zero
a * c < b * c
so it won't affect the best upgrade
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
eh maybe i dunno i'm too tired to think
ask Rime they're the one that made that helper
that's why i'm saying it here, feedback of something to check/ fix
or would it be better to open a support thread?
i see what you're doing
i get your idea
however iirc it's wrong
i'll try to redo the math tmr
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
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
no
we are normalizing the coach
we are getting the raw cps based on the multiplier
and that's all the coach does, raw cps * 0.01
it does not increase with any other multiplier
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
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
but that is all the coach does
it does not normalize since that's already the max for the coach
Actually I get what you mean now
We should be multiplying the cps from the other rabbits with the total cps multiplier
a couple screenshots if anyone needs clarification
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
can you give your IGN ? i'd like to check smth
NiaCat
it's past midnight i'll sleep on it and see tmr
not a great idea doing math rn tbh
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
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
technically the biggest the total multiplier the worse the issue then...
Well, yes
But you can't buy that many levels of the coach anyway
anyway seems right ig i might have fucked calculcations
Anyway, the fix is really simple as there's already a variable holding the total cps multiplier
tho it only matter at high levels and at high level you'll need coach 20 anyway
So I can just multiply the cps increase with that

Done
“A couple chocolate factory fixes” xD
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...
all good :3
sorry for keeping you up so late, gngn
also gl with your exam!
Gn raptor
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
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
erm actually
i like optimizing things just to get issues and learn from it
when you think everything is fine but then god said :
(just my patch doing funsies)
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 
It never did
But there's no factual way of calculating that as it simply depends on whether the user uses it right
there is a way which is called averaging
it's what things like skyhelper do, they just assume you use it right
we could probably do the same and have an efficiency setting
it's what i coded in my rework which is WIP and doesn't work yet cause having to balance actually prepping my exams and coding smthi enjoy is hard
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
it's actually a very small math
it will be as inaccurate as the player is inneficient
i mean it works rn
but i strive for more
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
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
evens out the jackrabbit being favoured when its not on
Oh
Well, at that time it is indeed better than jackrabbit so there's nothing wrong there
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
we could do what skyhanni does and just move the tooltip to the right of the gui 
Use adaptive tooltips to pin the tooltip to top corner
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
there could be
there will be in mine when it stop crashing
Is there an api endpoint for this?
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
the rabbits are in the api yeah
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
Perhaps get from api on login, cache until next reboot and save them on memory as they are found/bought
they released the chocolate factory api very fast luckily
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
here
prob ye
NEU repo has mappings too for the rarities
Uhh, what do we do for the api key stuff again?
wdym
and would be good on side when browing thru hoppity collection
well yeah
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
Is the plan to obfuscate the mod to hide the key or smthn?
Ur not allowed to make users generate hypixel API keys
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
Was the api being abused or something?
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
I don't think its allowed to have users put in their own dev keys though
nobody is putting any api key into skyblocker
This is for the hysky api I think
But isn't that what the mod hits?
But why would I need a hypixel API key
This change enforces the api calls to be only made from skyblocker mod rather than changing anything going onto hypixel if I understood correctly
if you're trying to view the api response in a json viewer or something you would need one
because you can't generate a skyblocker api token from your web browser, you have to be in game
oh u just mean that
yea
i cant postman
hysky anymore
and that id have to hit hypickle directly with my own dev key for data preview
ye
got ya
Do tokens get invalidated upon logging out of the game?
u can use this anywhere
in a few weeks it will return error 403 without the tokens
no but they're only valid for an hour
yes, they're signed using an EC256 keypair
Technically you could just log it and use that in the header of the request anywhere for an hour, no?
yeah
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
On the other hand I found out that ProfileUtils already does what I needed, I just need to parse the json and display it
yeah
do note though that as of the api changes branch it no longer initializes when u start the game
This should be much easier than I thought
because that was really wasteful
so you will want to request it after the token request has completed
Should I base my branch on top of that to make life easier?
At the cost of not being able to merge until then
Is it actually binded to a Minecraft account then ?
you can, I don't intend to change any of the APIs around that as all of my tasks are done (implementing tokens, reworking museum cache and item cooldowns)
it will be merged shortly after 1.21 branch is, which should happen tomorrow hopefully if LIAP can do 1.20.6 release
All right
yeah, ur chat signing signature is
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?
its available at launch but its initialized after the client has finished starting up
bc the profilekeys instance is not available at mod init
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
It's not signed by the server?
you can spoof the mc ver or the mod ver, the server ignores those rn bc no use
what isn't?
This
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
Would it make sense to create a callback event for token info retrieval?
oh yeah I thought of something with completable futures or whatever but an event is good
just make sure u fire it on the render thread or add documentation that its fired off thread
Uhh, how do I choose what thread to fire it on? Nvm found RenderHelper.runOnRenderThread
Mild panic there u were trusting a client without mojangs involvement there lol tyty for explanation
Didn't want to see some funny script kiddy get someone banned from skyblockers API
oh no no lol, I've thought it through for a while to make sure it wasn't exploitable in those ways
@celest birch https://wiki.vg/Mojang_API#Player_Certificates
idk seems small
External repo to make it harder to slip things in
wdym slip things in
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
149 line file not too long
I was gonna copy paste the class over after its reviewed (and change url to go directly to server)
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
by obfuscate I mean make it harder to understand/find
Ctrl click
github
Stick it in the readme lol
eh most ppl prob don't care
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
Also since I'm already requesting cf info, I could set the base values in cf to those obtained from the api
Nah
Rely on the screen surely
It's a better source of truth than a double cached API call
The api also includes collected_locations
So an egg collection helper could be done
yep
Do we have anything for profile changes that I can inject into?
I looked around and couldn't find anything, but you never know
I can make an easy thing that reads chat and updates profile based on that but that might allow api call spamming by constantly switching between profiles
Or maybe I can cache them based on profile uuid
For comparison
Seems to match
Nice
(Divine rabbits not printed as I have none if anyone sees this later)
How do we align stuff again
you could make your own tooltip component and render it yourself lol
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
Grrr
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
I landed in a mixin hell
Spent 4 hours trying to find a solution
But
Ehehe
huh?
looks nice
does it need to be a mixin hell tho?
It's not necessarily that bad
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
Moar
i feel like there's smth wrong here
tf is @align ??
also i personally dislike how stuff is aligned since we are not in excel, we are reading text
but it's just me
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
wouldnt it better if it displayed directly left of chocolate factory like the garden visitor thing
I thought about that too, but it could easily conflict with some mods like EMI
I'd need to make it movable or sth
but looks cleaner
does it ?
i have an easier time identifying what the value is if it's close to the name
true forgot about emi
Yeah perhaps the CF is a bit too much
skyblock has enough excel stuff to compete with eve online
minus all pvp shenanigans since we have none
But the other tooltip stuff was already aligned anyway, I just made the alignment more precise
not sure about cf align (I probably don't care) but align in bin tip is neat
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.
Does that happen in REI as well?
I've been using REI for a long time and never noticed it
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
yeah. Happened after hypxiels choco update
we should make a proxy to hypixel that fix the networking by sending the correct packets from the server to the client smh
Oh, perhaps I never noticed because I use firmament as well
i dont think we need to do it that way. i tried firmament one day and it worked there without any proxy thing
no more hypixel funni moment not sending packets because they won't think following what a server is supposed to do is fun
it's a joke
they probably hook into the client's server code to get the info if the server doesn't send the needed packets
it's painful that us client-modders have to fix failures of the servers
@valid stirrup do you know if the stray rabbits found in the CF screen actually go into your barn?
some do yes
Not all of them?
yes
Does it simply depend on whether you have them or some other criteria?
some do, some don't
no, it depends if they are barn rabbits or not
There are non-barn rabbits?
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
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
Are you displaying this off the CF screen?
i mean just cache them when the user open the menu smh
No
just use the barn then?
Just the main cf screen
I could add it to the barn too
Yes
yeah add the detail there
That's where I added it
like this is fine
.
it's long but fine
I'm probably misunderstanding the problem dw then
The current way is that I get the rabbits from api, match them against the NEU repo for rarities and then store them in some enums
But this is only done on login
It has to be updated during runtime
parse the chat messages
Speaking of which, does anybody have the "rabbit found" chat messages? I also need those
Yeah but there's also stray rabbits in the CF screen that apparently sometimes go into the barn and sometimes don't
And those don't send chat messages
i think when they do get added to the barn they send a message
That'd save me some effort
tbh just don't care and update the API once in a while, it's fine /hj
It's cached by ProfileUtils and I don't want to get into that mess
Tho, I'll have to
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>
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
ehm bad idea if you don't implement a cooldown system
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
a request every 15 sec to the Hypixel API will make you be dead
that's why its cached by the proxy
and if you cache it then it's your server that's gonna die
It's a chonky one too
Profiles by player uuid
Literally everything about your profiles and islandmates' profiles
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
Couldn’t we just interface inject a method into mutable text or does that not work?
That could work too, just wasn't sure about the specifics so I did whatever felt the easiest
I noticed that I can allow chaining them infinitely with this approach
But, should I?..
Would a grid tooltip be useful anywhere
I would say interface inject if possible
to avoid conflicts
I will, just dk if I should allow chaining
its unlikely a server will use that same syntax, but not impossible
return the MutableText instance?
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
the only problem with that
Though it kinda makes it harder to add it to a list
its not good for mutable text chains with .append() and stuff
since you will need to cast back to MutableText
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
Text.literal("this").alignWith(Text.empty()).withColor(0xFFFFFF);
if it works without it isn't the worst
That would have to be written as
Text tmp = Text.literal("this").withColor(0xFFFFFF);
tmp.alignWith(Text.empty());
//Do whatever with tmp
It would still work, just not very concise
Well, the code for rendering it is already done
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
you can
your mixin just needs to be an interface
this ain't Forge
How do I do variables though?
I don't use interfaces that often so idk how to work with them
All you need is class and abstract class
maybe just align
But aligning happens between 2 different rows
oh you can't
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
might be bad for memory leaks? unless I'm misunderstanding
but maybe move it to mutable text?
I think Hypixel uses that exclusively
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
prob wouldn't
as long as the text refernece isnt held in a map or smth
thats a constant
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
doubt it really matters
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
This thread has 1649 messages sent. Big number
We ramble a lot
gg on maintainer
Thanks
which message(s) are you checking for? because i know some of them don't appear in every case (e.g. bingo)
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)
Yeah I use the former
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
my slightly different color scheme
(i can't show golden stray rabbits because rare, but basically they are golden highlighted)
@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
Well, it's just the first item in the list of text
but ig could work
And it has 2 extra pixels distancing it from the lore
also maybe actually show time until you can buy for the shop things
I thought about that too, but then we'd have to artifically calculate chocolate as there's no chocolate counter anymore
And that could go wrong easily
Like time tower running out, reaching max chocolate
wdym ?
just use the value that is cached in the chocolate facroty helper
Like, to change the time required until upgrade every second
we don't need that
Unless you meant a static counter that doesn't change
I guess I could add it to items that your prestige is enough to buy & have stock
@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 - ")
it alr use startwith
why include the -
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
yeah cause it would match even after being collected
[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
k
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)
I would love to have the location names with cords in chat : )
wdym ?
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)"
it literally has waypoint at where you need to go
@spring light when you get fish the rabbit as a stray rabbit, this happen
That should be fine then
The rabbit collection just listens to chat for the new rabbit messages
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
:pain:it would actually help me if it cached exactly which rabbit the player had
guess i'll have to re-implement it
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
Oh
Well, it shouldn't be hard to change the regex slightly and add a rabbit name check
Most of it is already available
price / chps gained + max(price-bank),0)/curr chps
Is this a good way for best chocolate?
I don't understand what's the point of this
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
Ye so it is the best progress
Like for highlighting the best pick?
Yes I heard that from one of the top chocolate factory players
It's not particularly good
top chocolate factory players
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
What is the current algorithm?
Just total cps increase per chocolate spent
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
iirc yes there's smth like that to actually find the best one, but iirc it's even more complicated, because you have to handle the fact of buying multiple upgrades quickly, etc
the current implementation of the algorithm is much simpler and very close to what you would actually get with the complex algorithm anyway

i actually do know someones that's high up, but the very high of CF just contain all the people that do 100% of the event and also are lucky to get high rarity rabbits
ik its just a non issue here
imagine saying your the Top of AFKing though
like genuinely its so pointless
the 'top chocolate factory players' arent gonna use this mod
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)
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
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
But there are non 1.8.9 mods that have that
I'm shocked
but then even more reason lol, just use one of those for it?
val extra = (newAverageChocolate - averageChocolate).round(2)
val effectiveCost = (upgradeCost!! / extra).round(2)
This is the best calculator in 1.8.9 for cf
sure use the 1.8.9 if you want ultra-optimized CF as we likely won't implement it soon
@spring light this would be a good idea to do
https://discord.com/channels/879732108745125969/1253063535739539587
Make a ding sound for strat rabbits and maybe a repeated one for golden rabbits
i was gonna do that but then got distracted by that github issue
i'm gonna go ahead and do that ding
I thought stray rabbits play a ding sound by default?
They don't ?
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
I put pling already and i play it every 5 ticks until you click the rabbit lol
i just don't know what sound to put for golden
I would say the same but faster ?
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
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
one of the other note block sounds? like snare maybe?
or hat
https://mcasset.cloud/1.21/assets/minecraft/sounds/note
idk pick your favorite
@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
because people get eggs too fast
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
Huh
I thought I had that fixed
well
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
yes
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
Nvm I see what you mean now
the same issue
Hmm, this was initially fixed but I had to remove to make sure the message doesn't get sent twice
I guess I could re-add it but then idk how I could solve that other issue
How can it get sent twice ?
egg spawns before the chat message sometimes
how was this not noticed sooner