Fabric API

Fabric API

106M Downloads

Hook for modifying player movement during item use

haykam821 opened this issue · 2 comments

commented

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.

commented

I‘m working on it

commented

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