How to get item cooldown packet from server #2226
-
Hey! So there's a minecraft server, on which most items have usage cooldowns. In order to check the cooldown of an item, you must right click it. If you right click it, and there is no cooldown, it will be used, and go back on cooldown for a while. If there is a cooldown, it will send you an action bar message about the item's cooldown. So what I want to do is make a mod that will give you the cooldown remaining on an item, without requiring you to use the item. Like a keybind or something. I'm not at all sure how to go about doing this, but I would assume that I need to use packets, which I don't know how to use as far as minecraft goes. In any case, please offer any information you can on the topic of cooldown packets. (I'm guessing you send a packet asking for a cooldown of held/worn item, and then read a packet with answer. I may be wrong) EDIT: In other words, I would like to get the cooldown of an item (player cooldown, item cooldown, limit cooldown) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
check ClientPlayNetworkHandler for receiving the action bar message. parse the message and use the client player's itemCooldownManager to set the cooldown to allow the game to display it just like the ender pearl cooldown |
Beta Was this translation helpful? Give feedback.
check ClientPlayNetworkHandler for receiving the action bar message. parse the message and use the client player's itemCooldownManager to set the cooldown to allow the game to display it just like the ender pearl cooldown