Skip to content
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

Hook for modifying player movement during item use #4103

Open
haykam821 opened this issue Sep 20, 2024 · 2 comments
Open

Hook for modifying player movement during item use #4103

haykam821 opened this issue Sep 20, 2024 · 2 comments

Comments

@haykam821
Copy link
Contributor

Having the ability to modify player movement for items currently being used would be useful, as the current ClientPlayerEntity injection point is quite annoying and fickle to target:

public void tickMovement() {
	// etc

	if (this.isUsingItem() && !this.hasVehicle()) {
		this.input.movementSideways *= 0.2F;
		this.input.movementForward *= 0.2F;
		this.ticksLeftToDoubleTapSprint = 0;
	}

	// etc
}

For example, a mod may wish to adjust or disable the slowdown when a player is using the mod's custom bow.

@fishshi
Copy link

fishshi commented Sep 22, 2024

I‘m working on it

@fishshi
Copy link

fishshi commented Oct 28, 2024

I've done almost all the work now, and you can come help review it and give suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants