-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corpse Finder #960
base: master
Are you sure you want to change the base?
Corpse Finder #960
Conversation
pretty sure I clicked wrong thing but eh ima go see if it compiles and works |
tested, it works |
src/main/java/de/hysky/skyblocker/skyblock/dwarven/CorpseFinder.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/EggFinder.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/dwarven/CorpseFinder.java
Outdated
Show resolved
Hide resolved
063995c
to
b961414
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feature seems to work well. with a few nitpicks in the code:
src/main/java/de/hysky/skyblocker/skyblock/dwarven/CorpseFinder.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/dwarven/CorpseFinder.java
Outdated
Show resolved
Hide resolved
int z = Integer.parseInt(matcher.group("z")); | ||
LOGGER.info(PREFIX + "Parsed message! X:{}, Y:{}, Z:{}", x, y, z); | ||
boolean foundCorpse = false; | ||
BlockPos parsedPos = new BlockPos(x-1, y-1, z-1); // skyhanni cords format difference is -1, -1, -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is skyhanni the only other mod to send cwords? surely this would mess up detecting cwords from this mods messages. Would it be better just to see if they are within 2 blocks distance to a location instead of relying on this conversion?
lockPos parsedPos = new BlockPos(x, y, z);
...
...
if(corpse.waypoint.pos.getSquaredDistance(parsedPos) < 4) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're talking in terms of the temporary waypoint that gets added when someone sends a location, the way I wrote it wouldn't cause an issue. it would just add the corpse location to a list so it doesn't get shared since someone already shared it's location, parsing the waypoint was using skyhanni patcher coords waypoint feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tho reading it again, you'd probably want to use a range of blocks rather than checking corpse location, when I wrote it on SH I didn't see any other mod that had it like this so I just sent the corpse location, but other mods might share the player location.
and also some people just don't realise features like this exist so they just /patcher sendcoords
If you'd like help since I originally wrote it I don't mind, tho I'm writing it in kotlin, tho it looks like you're done |
I'm kinda sick rn so can't do much, brain isn't braining |
Pretty much the only thing is, check in a radius around the corpse like olim88 said, it's a small and niche thing but it'd be better that way |
This needs to be rebased as its not going to work on 1.21.2+ |
basically this thing
support sharing cords in chat. Support parsing cords from chat (skyhanni format). Shows corpse moment even a pixel of it gets on your screen
todo: make it parse skyblocker format