-
-
Notifications
You must be signed in to change notification settings - Fork 341
Add Viewer#playTotemOfUndyingEffect #2586
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
Add Viewer#playTotemOfUndyingEffect #2586
Conversation
Calling this just sendDeathProtection is going to be very vague. It should at least imply that its just visual effect. Also I think I would rather just call it totemOfUndying because thats very discoverable and understandable. Something like |
I believe the fact that it's the method in |
Effects aren't abstract thing, you want to play a specific one. Abstracting things out works well in the Data API because its a common entrypoint for basically anything. Its much easier to describe the actual effects based on from where they originate. I'm just not buying it that "death protection" is specific enough to distinct itself from any other possible options (Vanilla only has one for now). |
I should also add that the "death protection" term itself is also a very abstract concept. It could mean various things like the player is actively being protected from death, like invincibility, and many games display this by making the player semi transparent or distort the player model in different ways. |
Yeah, effects aren't abstract thing, I meant that it would be nice to have some consistency between these two things and if you find one, you will likely search for the same name because they originate from the same thing. |
I guess I can agree that it's abstract enough. But |
I believe that the naming concern was resolved the day it appeared as I renamed the method to |
Just to clarify, this method will only show the totem of undying animation? It doesn't actually run any of the actions specified in component |
Right, it's just fancy flying item on the player's screen |
Alright so @aromaa Any opinion on this? |
I'm not really against making something more generic but we run really fast to the situation at WHAT is an item activation? Can you play the shield animation? Open a book? Draw a bow? Ripple? And so on, and we should review all possible item interactions in that case and what this API should do. The other thing is can we guarantee that providing Isolating this to just totem makes this at least straightforward. |
You can give any item type with the death_protection component and it will play the animation with the corresponding texture on screen. It's not limited to the totem of undying. That's why I have been looking for an item-agnostic name, but yeah the "activation" term is quite vague. |
If we are going to append the component implicitly, I think it makes the most sense to be very explicit about this or the API is going to be ambiguous on what it actually does now or in the future when Mojang makes changes. |
No it doesn't alter the item server-side. This is all client-side only. The implementation fakes an item in the hand of the player, plays the animation, then removes the item. All in a bundle packet. |
My point was that if the API was in the shape of |
I see. I agree it makes sense to go with |
Merged by 5dd330e |
SpongeAPI | Sponge
With introduction of
DEATH_PROTECTION
item component it's now possible to play death protection effect with any ItemStack