-
Notifications
You must be signed in to change notification settings - Fork 20
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
Call axe disable timer in other situations #150
Comments
the code to disable the shield is |
Yep. I just got to modify the inventory tick method I'm using to check for it |
Last thing, the two shield methods after item don't know where to go and I'm not finding the right symbol pathing for it |
Yeah, that should be the shield item that you have trying to disable, not some class. Make sure to name variable that. |
What should I initialize the class variable with? It auto fills to null but I don't think that would be right |
It could either be Item, ActiveItem, ShieldItem, FabricShieldItem, or FabricBannerShieldItem, depending on the context. If you are trying to get the shield that the player has equipped, set it to equal player.getActiveItem(). |
So it works but it doesn't force the shield off being active. I can keep holding rightclick to keep the shield up even if it gets put on cooldown. Letting go the cooldown blocks it from being used as intended but it doesn't seem calling it this way forces you to stop using it |
Try adding this line before it: |
There's a brief fov change now when the cooldown is triggered but I can still keep the shield up. I'll post the block of code that calls it on a follow up post to see if one of the parts is messing with intended function. |
@OverRide |
Is there anything else I can do here? |
That code looks right to me, so I don't know what else to change. I will have tk test it myself when I have the time. |
Alrighty. It at least does get called but doesn't properly cancel the input is my guess given the brief fov shift. |
Still not having success over here fixing the bug on my end |
hey im coming back to this issue as I'm trying to update the lib, can you explain the issue/bug again, our previous comments don't ring any bells. |
@swapmasterx do you still need help with this? |
Sorry, been taking a large break from modding. Essentially the bug is that even when the cooldown is called via another means if you hold right click you can keep the shield up even when the item is visible on cooldown. Letting go of rightclick while on cooldown and you can't raise the shield again until the cooldown expires as expected. |
So calling the disable event starts the cool down but does not disable active shields? I'll have to look into how this event is structured. |
How would I call the activation of the disable timer in cases outside just an axe. For example, calling it when the shield reaches a certain durability threshold.
The text was updated successfully, but these errors were encountered: