-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "use home-grown key binding system"
This reverts commit b3e3ad5.
- Loading branch information
Showing
19 changed files
with
159 additions
and
196 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
platform/fabric/src/main/java/mcp/mobius/waila/fabric/FabricClientService.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,16 @@ | ||
package mcp.mobius.waila.fabric; | ||
|
||
import com.mojang.blaze3d.platform.InputConstants; | ||
import mcp.mobius.waila.api.WailaConstants; | ||
import mcp.mobius.waila.service.IClientService; | ||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; | ||
import net.minecraft.client.KeyMapping; | ||
|
||
public class FabricClientService implements IClientService { | ||
|
||
@Override | ||
public KeyMapping createKeyBind(String id, int key) { | ||
return KeyBindingHelper.registerKeyBinding(new KeyMapping(id, InputConstants.Type.KEYSYM, key, WailaConstants.MOD_NAME)); | ||
} | ||
|
||
} |
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
1 change: 1 addition & 0 deletions
1
platform/fabric/src/main/resources/META-INF/services/mcp.mobius.waila.service.IClientService
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 @@ | ||
mcp.mobius.waila.fabric.FabricClientService |
17 changes: 17 additions & 0 deletions
17
platform/forge/src/main/java/mcp/mobius/waila/forge/ForgeClientService.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,17 @@ | ||
package mcp.mobius.waila.forge; | ||
|
||
import com.mojang.blaze3d.platform.InputConstants; | ||
import mcp.mobius.waila.api.WailaConstants; | ||
import mcp.mobius.waila.service.IClientService; | ||
import net.minecraft.client.KeyMapping; | ||
import net.minecraftforge.client.settings.KeyConflictContext; | ||
import net.minecraftforge.client.settings.KeyModifier; | ||
|
||
public class ForgeClientService implements IClientService { | ||
|
||
@Override | ||
public KeyMapping createKeyBind(String id, int key) { | ||
return new KeyMapping(id, KeyConflictContext.IN_GAME, KeyModifier.NONE, InputConstants.Type.KEYSYM, key, WailaConstants.MOD_NAME); | ||
} | ||
|
||
} |
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
1 change: 1 addition & 0 deletions
1
platform/forge/src/main/resources/META-INF/services/mcp.mobius.waila.service.IClientService
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 @@ | ||
mcp.mobius.waila.forge.ForgeClientService |
17 changes: 17 additions & 0 deletions
17
platform/neo/src/main/java/mcp/mobius/waila/neo/NeoClientService.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,17 @@ | ||
package mcp.mobius.waila.neo; | ||
|
||
import com.mojang.blaze3d.platform.InputConstants; | ||
import mcp.mobius.waila.api.WailaConstants; | ||
import mcp.mobius.waila.service.IClientService; | ||
import net.minecraft.client.KeyMapping; | ||
import net.neoforged.neoforge.client.settings.KeyConflictContext; | ||
import net.neoforged.neoforge.client.settings.KeyModifier; | ||
|
||
public class NeoClientService implements IClientService { | ||
|
||
@Override | ||
public KeyMapping createKeyBind(String id, int key) { | ||
return new KeyMapping(id, KeyConflictContext.IN_GAME, KeyModifier.NONE, InputConstants.Type.KEYSYM, key, WailaConstants.MOD_NAME); | ||
} | ||
|
||
} |
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
1 change: 1 addition & 0 deletions
1
platform/neo/src/main/resources/META-INF/services/mcp.mobius.waila.service.IClientService
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 @@ | ||
mcp.mobius.waila.neo.NeoClientService |
16 changes: 16 additions & 0 deletions
16
platform/quilt/src/main/java/mcp/mobius/waila/quilt/QuiltClientService.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,16 @@ | ||
package mcp.mobius.waila.quilt; | ||
|
||
import com.mojang.blaze3d.platform.InputConstants; | ||
import mcp.mobius.waila.api.WailaConstants; | ||
import mcp.mobius.waila.service.IClientService; | ||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; | ||
import net.minecraft.client.KeyMapping; | ||
|
||
public class QuiltClientService implements IClientService { | ||
|
||
@Override | ||
public KeyMapping createKeyBind(String id, int key) { | ||
return KeyBindingHelper.registerKeyBinding(new KeyMapping(id, InputConstants.Type.KEYSYM, key, WailaConstants.MOD_NAME)); | ||
} | ||
|
||
} |
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
1 change: 1 addition & 0 deletions
1
platform/quilt/src/main/resources/META-INF/services/mcp.mobius.waila.service.IClientService
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 @@ | ||
mcp.mobius.waila.quilt.QuiltClientService |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.