-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Motschen/1.18.2
Migrate from LambdaControls to MidnightControls
- Loading branch information
Showing
12 changed files
with
67 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/io/github/foundationgames/automobility/mixin/ClientPlayerEntityMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
...main/java/io/github/foundationgames/automobility/util/lambdacontrols/ControllerUtils.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...in/java/io/github/foundationgames/automobility/util/midnightcontrols/ControllerUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.github.foundationgames.automobility.util.midnightcontrols; | ||
|
||
import net.fabricmc.loader.api.FabricLoader; | ||
|
||
public enum ControllerUtils {; | ||
public static boolean accelerating() { | ||
return isMidnightControlsLoaded() && AutomobilityMidnightControls.ACCELERATE.isButtonDown(); | ||
} | ||
|
||
public static boolean braking() { | ||
return isMidnightControlsLoaded() && AutomobilityMidnightControls.BRAKE.isButtonDown(); | ||
} | ||
|
||
public static boolean drifting() { | ||
return isMidnightControlsLoaded() && AutomobilityMidnightControls.DRIFT.isButtonDown(); | ||
} | ||
|
||
public static boolean inControllerMode() { | ||
return isMidnightControlsLoaded() && AutomobilityMidnightControls.IN_CONTROLLER_MODE.get(); | ||
} | ||
|
||
public static void initMidnightControlsHandler() { | ||
if (isMidnightControlsLoaded()) AutomobilityMidnightControls.init(); | ||
} | ||
|
||
public static boolean isMidnightControlsLoaded() { | ||
return FabricLoader.getInstance().isModLoaded("midnightcontrols"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters