diff options
author | ingle <inglettronald@gmail.com> | 2022-10-08 23:03:13 -0500 |
---|---|---|
committer | ingle <inglettronald@gmail.com> | 2022-10-08 23:03:13 -0500 |
commit | f9b44615f23d1417471da13ca230d6b790ce421a (patch) | |
tree | 2cd9d1737d3346f790dc7829b9e1b8c37e4b45ed | |
parent | 704d0de8ddb4c4aa71033463dc4a9df1e9afd5ab (diff) | |
download | DulkirMod-f9b44615f23d1417471da13ca230d6b790ce421a.tar.gz DulkirMod-f9b44615f23d1417471da13ca230d6b790ce421a.tar.bz2 DulkirMod-f9b44615f23d1417471da13ca230d6b790ce421a.zip |
+ hopefully add cool keybinds
-rw-r--r-- | build.gradle.kts | 2 | ||||
-rw-r--r-- | src/main/java/dulkirmod/mixins/MixinSkytils.java | 21 | ||||
-rw-r--r-- | src/main/kotlin/dulkirmod/DulkirMod.kt | 7 | ||||
-rw-r--r-- | src/main/resources/mixins.dulkirmod.json | 1 |
4 files changed, 29 insertions, 2 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 62f2630..860bf54 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } group = "com.example.archloomtemplate" -version = "1.0.5" +version = "1.0.6" // Toolchains: java { diff --git a/src/main/java/dulkirmod/mixins/MixinSkytils.java b/src/main/java/dulkirmod/mixins/MixinSkytils.java new file mode 100644 index 0000000..24de061 --- /dev/null +++ b/src/main/java/dulkirmod/mixins/MixinSkytils.java @@ -0,0 +1,21 @@ +package dulkirmod.mixins; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Pseudo; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Pseudo +@Mixin(targets = "gg.skytils.skytilsmod.core.Config", remap = false) +public class MixinSkytils { + + @Shadow + private static boolean waterBoardSolver; + + @Inject(method = "getWaterBoardSolver", at = @At("HEAD"), cancellable = true) + private static void changeValue(CallbackInfoReturnable<Boolean> cir) { + cir.setReturnValue(false); + } +} diff --git a/src/main/kotlin/dulkirmod/DulkirMod.kt b/src/main/kotlin/dulkirmod/DulkirMod.kt index c6aa4ab..b03b770 100644 --- a/src/main/kotlin/dulkirmod/DulkirMod.kt +++ b/src/main/kotlin/dulkirmod/DulkirMod.kt @@ -96,22 +96,27 @@ class DulkirMod { @SubscribeEvent fun onKey(event: KeyInputEvent) { if (keyBinds[0].isPressed) display = config.gui() + if (keyBinds[1].isPressed) Config.noReverse3rdPerson = !Config.noReverse3rdPerson + if (keyBinds[2].isPressed) skytilsWaterSolver = !skytilsWaterSolver } companion object { const val MOD_ID = "dulkirmod" const val MOD_NAME = "Dulkir Mod" - const val MOD_VERSION = "1.0.5" + const val MOD_VERSION = "1.0.6" const val CHAT_PREFIX = "<DulkirMod>" val mc: Minecraft = Minecraft.getMinecraft() var config = Config var display: GuiScreen? = null + var skytilsWaterSolver = false val scope = CoroutineScope(EmptyCoroutineContext) val titleUtils = TitleUtils() val keyBinds = arrayOf( KeyBinding("Open Settings", Keyboard.KEY_RSHIFT, "Dulkir Mod"), + KeyBinding("Toggle Selfie Setting", Keyboard.KEY_NONE, "Dulkir Mod"), + KeyBinding("Toggle Skytils WaterSolver", Keyboard.KEY_NONE, "Dulkir Mod"), ) } diff --git a/src/main/resources/mixins.dulkirmod.json b/src/main/resources/mixins.dulkirmod.json index 4921d12..34294ed 100644 --- a/src/main/resources/mixins.dulkirmod.json +++ b/src/main/resources/mixins.dulkirmod.json @@ -10,6 +10,7 @@ "mixins": [ "MixinEntity", "MixinEntityLivingBase", + "MixinSkytils", "MixinWorld" ] } |