Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support advancements #2

Merged
merged 8 commits into from
Dec 27, 2022
Merged

Support advancements #2

merged 8 commits into from
Dec 27, 2022

Conversation

unilock
Copy link

@unilock unilock commented Dec 16, 2022

It works!!

Note that I changed onEntityDeath() (previously onPlayerDeath()) and sendMessage() to use player.getName() instead of player.getDisplayName(), since VelocityDiscord can only support "real names" and not e.g. nicknames.
(...unless?)
EDIT: I must've broken something, because now player names are showing up as "Realname ~Nickname" :v
Fixed. Also switched ALLOW_DEATH to AFTER_DEATH to not send the (cancelled) death message when a Totem of Undying is used.
Also, I made it such that advancements are bridged only when the entire advancement is granted rather than when only a criterion has been achieved - for example, the advancement granted after every Nether biome has been explored is now only mirrored to Discord once every biome has been explored, rather than every time an individual biome is explored.

Fixes #1.
Partially fixes fooooooooooooooo/VelocityDiscord#4.

idea_get_out_of_my_way=0x1

Signed-off-by: unilock <[email protected]>
Signed-off-by: unilock <[email protected]>
Signed-off-by: unilock <[email protected]>
…ngEntityEvents.ALLOW_DEATH

we use getName() instead of getDisplayName() for parity with VelocityDiscord, which can only use "real names" (not e.g. nicknames)

Signed-off-by: unilock <[email protected]>
we want to remove getDisplayName() (nickname) in getDeathMessage() ("nickname died because ...") in order to prefix the death message with getName() (realname) later

Signed-off-by: unilock <[email protected]>
i.e. the advancement for exploring every nether biome is now sent only once, when all biomes have been explored, rather than every time a new biome was explored (thus fulfilling only *part* of the advancement)

Signed-off-by: unilock <[email protected]>
@fooooooooooooooo
Copy link
Owner

is this ready to merge?

@unilock
Copy link
Author

unilock commented Dec 27, 2022

Should be, yeah.

@fooooooooooooooo fooooooooooooooo merged commit 5357255 into fooooooooooooooo:fabric Dec 27, 2022
@unilock unilock mentioned this pull request Dec 28, 2022
@unilock unilock deleted the fabric-fix-fix branch January 26, 2023 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants