-
Notifications
You must be signed in to change notification settings - Fork 70
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
Sword blocking animation #769
Comments
Also cool side note, they fixed this bug: https://bugs.mojang.com/browse/MC-152728 |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This is currently difficult to achieve, ProtocolLib still can't be loaded on 1.21.4 server. I made a plugin to implement this animation just now. (but it can't reduce damage) src: |
That only seems to deal with the animation, but we use the shield because it genuinely does block damage, we just configure by how much. How could we ever tell if the damage was meant to be blocked or not otherwise? |
By checking if the current use item has consumable of type block & has the custom data field of whatever to check if it is a OCM blocking tool/is a sword? |
There is many ways to check if you are blocking as the consumable thing makes the sword act as a BLOCKING item like shield, so you should be able to do like "isBlocking" or whatever spigot/paper method is and do the custom reduced damage or whatever |
That's assuming the client sends packets with the blocking bit set. Also does this mean we have to modify all sword to have the animation property? Because OCM does not modify any items and this is deliberate, because it leads to a nightmare of tracking what items were changed when, and what happens if you uninstall the plugin. It's the same reason we don't edit the attack damage labels on the items directly. |
Now that 1.21.2 has come out and split the food component into two, food and consumable. The consumable component has a field named animation which allows you to specify the animation played when using said item, one of those animations being "block". Currently tho in 1.21.2/3, it only shows the blocking animation in third person but I reported the first person animation missing as a bug (https://bugs.mojang.com/browse/MC-275917) and it has been fixed and the first person animation has been introduced into 24w44a.
Yall should add a option/abandon using the shield as the way of blocking and instead give the swords the new consumable component with the animation of "block" and consume seconds of 3600 (same time as it was hardcoded in 1.8)
The text was updated successfully, but these errors were encountered: