-
Notifications
You must be signed in to change notification settings - Fork 404
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 MODIFY_PLAYER_MOVEMENT_DURING_USINGITEM #4112
base: 1.21.1
Are you sure you want to change the base?
add MODIFY_PLAYER_MOVEMENT_DURING_USINGITEM #4112
Conversation
|
||
public final class ClientPlayerEvents { | ||
/** | ||
* An event that is called when a player is moving during using an item. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Whats an example usecase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, a mod may wish to adjust or disable the slowdown when a player is using the mod's custom bow.
import net.fabricmc.fabric.api.event.Event; | ||
import net.fabricmc.fabric.api.event.EventFactory; | ||
|
||
public final class ClientPlayerEvents { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Does this also need to be handled on the server somewhere? E.g if I wanted to increase the players speed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary to make any changes on the server, as all information related to movement speed is processed on the client and sent to the server. We only need to modify the movement speed on the client. In the test mod, if you want to increase the player's speed, you only need to modify the multiplier coefficient. If you have any thoughts or additional comments, please let me know with more detailed information.
add a hook for modify player's movement during using item.
solve the issue:
#4103 (comment)