forked from Clones/Controlify
✏️ Refactor boat fix slightly
This commit is contained in:
@ -6,5 +6,5 @@ import dev.isxander.controlify.mixins.feature.patches.boatfix.BoatMixin;
|
|||||||
* @see BoatMixin
|
* @see BoatMixin
|
||||||
*/
|
*/
|
||||||
public interface AnalogBoatInput {
|
public interface AnalogBoatInput {
|
||||||
void setAnalogInput(float forward, float right);
|
void controlify$setAnalogInput(float forward, float right);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ public abstract class BoatMixin implements AnalogBoatInput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAnalogInput(float forward, float right) {
|
public void controlify$setAnalogInput(float forward, float right) {
|
||||||
this.usingAnalogInput = true;
|
this.usingAnalogInput = true;
|
||||||
|
|
||||||
this.analogForward = forward;
|
this.analogForward = forward;
|
||||||
|
@ -18,8 +18,8 @@ public class LocalPlayerMixin {
|
|||||||
|
|
||||||
@WrapOperation(method = "rideTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/vehicle/Boat;setInput(ZZZZ)V"))
|
@WrapOperation(method = "rideTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/vehicle/Boat;setInput(ZZZZ)V"))
|
||||||
private void useAnalogInput(Boat boat, boolean pressingLeft, boolean pressingRight, boolean pressingForward, boolean pressingBack, Operation<Void> original) {
|
private void useAnalogInput(Boat boat, boolean pressingLeft, boolean pressingRight, boolean pressingForward, boolean pressingBack, Operation<Void> original) {
|
||||||
if (ControlifyApi.get().currentInputMode().isController() && !Controlify.instance().config().globalSettings().keyboardMovement) {
|
if (ControlifyApi.get().currentInputMode().isController() && !Controlify.instance().config().globalSettings().shouldUseKeyboardMovement()) {
|
||||||
((AnalogBoatInput) boat).setAnalogInput(
|
((AnalogBoatInput) boat).controlify$setAnalogInput(
|
||||||
input.forwardImpulse,
|
input.forwardImpulse,
|
||||||
-input.leftImpulse
|
-input.leftImpulse
|
||||||
);
|
);
|
||||||
|
@ -35,8 +35,6 @@
|
|||||||
"feature.bind.ToggleKeyMappingAccessor",
|
"feature.bind.ToggleKeyMappingAccessor",
|
||||||
"feature.chatkbheight.ChatComponentMixin",
|
"feature.chatkbheight.ChatComponentMixin",
|
||||||
"feature.chatkbheight.ChatScreenMixin",
|
"feature.chatkbheight.ChatScreenMixin",
|
||||||
"feature.patches.boatfix.BoatMixin",
|
|
||||||
"feature.patches.boatfix.LocalPlayerMixin",
|
|
||||||
"feature.guide.ingame.ClientPacketListenerMixin",
|
"feature.guide.ingame.ClientPacketListenerMixin",
|
||||||
"feature.guide.ingame.GuiMixin",
|
"feature.guide.ingame.GuiMixin",
|
||||||
"feature.guide.screen.AbstractButtonMixin",
|
"feature.guide.screen.AbstractButtonMixin",
|
||||||
@ -45,6 +43,8 @@
|
|||||||
"feature.guide.screen.TabNavigationBarMixin",
|
"feature.guide.screen.TabNavigationBarMixin",
|
||||||
"feature.input.MinecraftMixin",
|
"feature.input.MinecraftMixin",
|
||||||
"feature.oofinput.GameRendererMixin",
|
"feature.oofinput.GameRendererMixin",
|
||||||
|
"feature.patches.boatfix.BoatMixin",
|
||||||
|
"feature.patches.boatfix.LocalPlayerMixin",
|
||||||
"feature.reacharound.GameRendererMixin",
|
"feature.reacharound.GameRendererMixin",
|
||||||
"feature.rumble.blockbreak.MultiPlayerGameModeMixin",
|
"feature.rumble.blockbreak.MultiPlayerGameModeMixin",
|
||||||
"feature.rumble.damage.LocalPlayerMixin",
|
"feature.rumble.damage.LocalPlayerMixin",
|
||||||
|
Reference in New Issue
Block a user