Auto Sprint
This commit is contained in:
16
src/main/java/moe/nea/firmament/mixins/MixinKeyBinding.java
Normal file
16
src/main/java/moe/nea/firmament/mixins/MixinKeyBinding.java
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
package moe.nea.firmament.mixins;
|
||||||
|
|
||||||
|
import moe.nea.firmament.features.fixes.Fixes;
|
||||||
|
import net.minecraft.client.option.KeyBinding;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(KeyBinding.class)
|
||||||
|
public class MixinKeyBinding {
|
||||||
|
@Inject(method = "isPressed", at = @At("HEAD"), cancellable = true)
|
||||||
|
public void onIsPressed(CallbackInfoReturnable<Boolean> cir) {
|
||||||
|
Fixes.INSTANCE.handleIsPressed((KeyBinding) (Object) this, cir);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,10 @@ package moe.nea.firmament.features.fixes
|
|||||||
|
|
||||||
import moe.nea.firmament.features.FirmamentFeature
|
import moe.nea.firmament.features.FirmamentFeature
|
||||||
import moe.nea.firmament.gui.config.ManagedConfig
|
import moe.nea.firmament.gui.config.ManagedConfig
|
||||||
|
import moe.nea.firmament.util.MC
|
||||||
|
import net.minecraft.client.MinecraftClient
|
||||||
|
import net.minecraft.client.option.KeyBinding
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable
|
||||||
|
|
||||||
object Fixes : FirmamentFeature {
|
object Fixes : FirmamentFeature {
|
||||||
override val identifier: String
|
override val identifier: String
|
||||||
@@ -15,11 +19,20 @@ object Fixes : FirmamentFeature {
|
|||||||
|
|
||||||
object TConfig : ManagedConfig(identifier) {
|
object TConfig : ManagedConfig(identifier) {
|
||||||
val fixUnsignedPlayerSkins by toggle("player-skins") { true }
|
val fixUnsignedPlayerSkins by toggle("player-skins") { true }
|
||||||
|
val autoSprint by toggle("auto-sprint") { false }
|
||||||
}
|
}
|
||||||
|
|
||||||
override val config: ManagedConfig
|
override val config: ManagedConfig
|
||||||
get() = TConfig
|
get() = TConfig
|
||||||
|
|
||||||
|
fun handleIsPressed(
|
||||||
|
keyBinding: KeyBinding,
|
||||||
|
cir: CallbackInfoReturnable<Boolean>
|
||||||
|
) {
|
||||||
|
if (keyBinding === MinecraftClient.getInstance().options.sprintKey && TConfig.autoSprint && MC.player?.isSprinting != true)
|
||||||
|
cir.returnValue = true
|
||||||
|
}
|
||||||
|
|
||||||
override fun onLoad() {
|
override fun onLoad() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,90 +1,91 @@
|
|||||||
{
|
{
|
||||||
"firmament.dev.resourcerebuild.start": "Invoking gradle resource rebuild (./gradlew :processResources)",
|
"firmament.dev.resourcerebuild.start": "Invoking gradle resource rebuild (./gradlew :processResources)",
|
||||||
"firmament.dev.resourcerebuild.done": "Gradle resource rebuild done in %s",
|
"firmament.dev.resourcerebuild.done": "Gradle resource rebuild done in %s",
|
||||||
"firmament.config.developer": "Developer Settings",
|
"firmament.config.developer": "Developer Settings",
|
||||||
"firmament.config.developer.auto-rebuild": "Automatically rebuild resources",
|
"firmament.config.developer.auto-rebuild": "Automatically rebuild resources",
|
||||||
"firmament.price": "Checking price for %s",
|
"firmament.price": "Checking price for %s",
|
||||||
"firmament.price.bazaar": "Bazaar stats:",
|
"firmament.price.bazaar": "Bazaar stats:",
|
||||||
"firmament.price.bazaar.productid": "Stock id: %s",
|
"firmament.price.bazaar.productid": "Stock id: %s",
|
||||||
"firmament.price.bazaar.buy.price": "Buy Price: %s",
|
"firmament.price.bazaar.buy.price": "Buy Price: %s",
|
||||||
"firmament.price.bazaar.buy.order": "Buy orders: %d",
|
"firmament.price.bazaar.buy.order": "Buy orders: %d",
|
||||||
"firmament.pv.pets": "Pets",
|
"firmament.pv.pets": "Pets",
|
||||||
"firmament.debug.skyblockid": "SkyBlock ID: %s",
|
"firmament.debug.skyblockid": "SkyBlock ID: %s",
|
||||||
"firmament.debug.skyblockid.copy": "Click to copy SkyBlock ID",
|
"firmament.debug.skyblockid.copy": "Click to copy SkyBlock ID",
|
||||||
"firmament.price.bazaar.sell.price": "Sell Price: %s",
|
"firmament.price.bazaar.sell.price": "Sell Price: %s",
|
||||||
"firmament.price.bazaar.sell.order": "Sell orders: %d",
|
"firmament.price.bazaar.sell.order": "Sell orders: %d",
|
||||||
"firmament.price.lowestbin": "Lowest BIN: %s",
|
"firmament.price.lowestbin": "Lowest BIN: %s",
|
||||||
"firmament.repo.reload.network": "Trying to redownload the repository",
|
"firmament.repo.reload.network": "Trying to redownload the repository",
|
||||||
"firmament.repo.reload.disk": "Reloading repository from disk. This may lag a bit.",
|
"firmament.repo.reload.disk": "Reloading repository from disk. This may lag a bit.",
|
||||||
"firmament.repo.cache": "Recaching items",
|
"firmament.repo.cache": "Recaching items",
|
||||||
"firmament.repo.brokenitem": "Failed to render item: %s",
|
"firmament.repo.brokenitem": "Failed to render item: %s",
|
||||||
"firmanent.config.edit": "Edit",
|
"firmanent.config.edit": "Edit",
|
||||||
"firmament.config.repo": "Firmament Repo Settings",
|
"firmament.config.repo": "Firmament Repo Settings",
|
||||||
"firmament.config.repo.autoUpdate": "Auto Update",
|
"firmament.config.repo.autoUpdate": "Auto Update",
|
||||||
"firmament.config.repo.username": "Repo Username",
|
"firmament.config.repo.username": "Repo Username",
|
||||||
"firmament.config.repo.username.hint": "NotEnoughUpdates",
|
"firmament.config.repo.username.hint": "NotEnoughUpdates",
|
||||||
"firmament.config.repo.reponame": "Repo Name",
|
"firmament.config.repo.reponame": "Repo Name",
|
||||||
"firmament.config.repo.reponame.hint": "NotEnoughUpdates-REPO",
|
"firmament.config.repo.reponame.hint": "NotEnoughUpdates-REPO",
|
||||||
"firmament.config.repo.branch": "Repo Branch",
|
"firmament.config.repo.branch": "Repo Branch",
|
||||||
"firmament.config.repo.branch.hint": "dangerous",
|
"firmament.config.repo.branch.hint": "dangerous",
|
||||||
"firmament.config.repo.reset": "Reset",
|
"firmament.config.repo.reset": "Reset",
|
||||||
"firmament.ursa.debugrequest.start": "Ursa request launched",
|
"firmament.ursa.debugrequest.start": "Ursa request launched",
|
||||||
"firmament.ursa.debugrequest.result": "Ursa request succeeded: %s",
|
"firmament.ursa.debugrequest.result": "Ursa request succeeded: %s",
|
||||||
"firmament.sbinfo.nolocraw": "No locraw data available",
|
"firmament.sbinfo.nolocraw": "No locraw data available",
|
||||||
"firmament.sbinfo.profile": "Current profile cutename: %s",
|
"firmament.sbinfo.profile": "Current profile cutename: %s",
|
||||||
"firmament.sbinfo.server": "Locraw Server: %s",
|
"firmament.sbinfo.server": "Locraw Server: %s",
|
||||||
"firmament.sbinfo.gametype": "Locraw Gametype: %s",
|
"firmament.sbinfo.gametype": "Locraw Gametype: %s",
|
||||||
"firmament.sbinfo.mode": "Locraw Mode: %s",
|
"firmament.sbinfo.mode": "Locraw Mode: %s",
|
||||||
"firmament.sbinfo.map": "Locraw Map: %s",
|
"firmament.sbinfo.map": "Locraw Map: %s",
|
||||||
"firmament.config.fairy-souls": "Fairy Souls",
|
"firmament.config.fairy-souls": "Fairy Souls",
|
||||||
"firmament.config.fairy-souls.show": "Show Fairy Soul Waypoints",
|
"firmament.config.fairy-souls.show": "Show Fairy Soul Waypoints",
|
||||||
"firmament.config.fairy-souls.reset": "Reset Collected Fairy Souls",
|
"firmament.config.fairy-souls.reset": "Reset Collected Fairy Souls",
|
||||||
"firmament.config.fishing-warning": "Fishing Warning",
|
"firmament.config.fishing-warning": "Fishing Warning",
|
||||||
"firmament.config.fishing-warning.display-warning": "Display a warning when you are about to hook a fish",
|
"firmament.config.fishing-warning.display-warning": "Display a warning when you are about to hook a fish",
|
||||||
"firmament.config.fishing-warning.highlight-wake-chain": "Highlight fishing particles",
|
"firmament.config.fishing-warning.highlight-wake-chain": "Highlight fishing particles",
|
||||||
"firmament.key.slotlocking": "Lock Slot / Slot Binding",
|
"firmament.key.slotlocking": "Lock Slot / Slot Binding",
|
||||||
"firmament.key.category": "Firmament",
|
"firmament.key.category": "Firmament",
|
||||||
"firmament.protectitem": "Firmament protected your item: ",
|
"firmament.protectitem": "Firmament protected your item: ",
|
||||||
"firmament.recipe.forge.time": "Forging Time: %s",
|
"firmament.recipe.forge.time": "Forging Time: %s",
|
||||||
"firmament.pv.skills": "Skills",
|
"firmament.pv.skills": "Skills",
|
||||||
"firmament.pv.skills.farming": "Farming",
|
"firmament.pv.skills.farming": "Farming",
|
||||||
"firmament.pv.skills.foraging": "Foraging",
|
"firmament.pv.skills.foraging": "Foraging",
|
||||||
"firmament.pv.skills.mining": "Mining",
|
"firmament.pv.skills.mining": "Mining",
|
||||||
"firmament.pv.skills.alchemy": "Alchemy",
|
"firmament.pv.skills.alchemy": "Alchemy",
|
||||||
"firmament.pv.skills.taming": "Taming",
|
"firmament.pv.skills.taming": "Taming",
|
||||||
"firmament.pv.skills.fishing": "Fishing",
|
"firmament.pv.skills.fishing": "Fishing",
|
||||||
"firmament.pv.skills.runecrafting": "Runecrafting",
|
"firmament.pv.skills.runecrafting": "Runecrafting",
|
||||||
"firmament.pv.skills.carpentry": "Carpentry",
|
"firmament.pv.skills.carpentry": "Carpentry",
|
||||||
"firmament.pv.skills.combat": "Combat",
|
"firmament.pv.skills.combat": "Combat",
|
||||||
"firmament.pv.skills.social": "Social",
|
"firmament.pv.skills.social": "Social",
|
||||||
"firmament.pv.skills.rift": "Rift",
|
"firmament.pv.skills.rift": "Rift",
|
||||||
"firmament.pv.skills.enchanting": "Enchanting",
|
"firmament.pv.skills.enchanting": "Enchanting",
|
||||||
"firmament.pv.skills.total": "Total Exp: %s",
|
"firmament.pv.skills.total": "Total Exp: %s",
|
||||||
"firmament.pv.lookingup": "Looking up %s",
|
"firmament.pv.lookingup": "Looking up %s",
|
||||||
"firmament.pv.noprofile": "%s has no SkyBlock profiles",
|
"firmament.pv.noprofile": "%s has no SkyBlock profiles",
|
||||||
"firmament.pv.noplayer": "%s is not a Minecraft player",
|
"firmament.pv.noplayer": "%s is not a Minecraft player",
|
||||||
"firmament.config.save-cursor-position.enable": "Enable",
|
"firmament.config.save-cursor-position.enable": "Enable",
|
||||||
"firmament.config.save-cursor-position.tolerance": "Tolerance",
|
"firmament.config.save-cursor-position.tolerance": "Tolerance",
|
||||||
"firmament.config.save-cursor-position": "Save Cursor Position",
|
"firmament.config.save-cursor-position": "Save Cursor Position",
|
||||||
"firmament.config.storage-overlay": "Storage Overlay",
|
"firmament.config.storage-overlay": "Storage Overlay",
|
||||||
"firmament.config.storage-overlay.rows": "Rows",
|
"firmament.config.storage-overlay.rows": "Rows",
|
||||||
"firmament.config.storage-overlay.padding": "Padding",
|
"firmament.config.storage-overlay.padding": "Padding",
|
||||||
"firmament.config.storage-overlay.scroll-speed": "Scroll Speed",
|
"firmament.config.storage-overlay.scroll-speed": "Scroll Speed",
|
||||||
"firmament.config.storage-overlay.inverse-scroll": "Invert Scroll",
|
"firmament.config.storage-overlay.inverse-scroll": "Invert Scroll",
|
||||||
"firmament.config.storage-overlay.margin": "Margin",
|
"firmament.config.storage-overlay.margin": "Margin",
|
||||||
"firmament.config.chat-links": "Chat Links",
|
"firmament.config.chat-links": "Chat Links",
|
||||||
"firmament.config.chat-links.links-enabled": "Enable Clickable Links",
|
"firmament.config.chat-links.links-enabled": "Enable Clickable Links",
|
||||||
"firmament.config.chat-links.image-enabled": "Enable Image Preview",
|
"firmament.config.chat-links.image-enabled": "Enable Image Preview",
|
||||||
"firmament.config.chat-links.allow-all-hosts": "Allow all Image Hosts",
|
"firmament.config.chat-links.allow-all-hosts": "Allow all Image Hosts",
|
||||||
"firmament.config.chat-links.allowed-hosts": "Allowed Image Hosts",
|
"firmament.config.chat-links.allowed-hosts": "Allowed Image Hosts",
|
||||||
"firmament.config.chat-links.position": "Chat Image Preview",
|
"firmament.config.chat-links.position": "Chat Image Preview",
|
||||||
"firmament.hud.edit": "Edit %s",
|
"firmament.hud.edit": "Edit %s",
|
||||||
"firmament.keybinding.external": "External",
|
"firmament.keybinding.external": "External",
|
||||||
"firmament.config.slot-locking": "Slot Locking",
|
"firmament.config.slot-locking": "Slot Locking",
|
||||||
"firmament.config.slot-locking.lock": "Lock Slot",
|
"firmament.config.slot-locking.lock": "Lock Slot",
|
||||||
"firmament.config.custom-skyblock-textures": "Custom SkyBlock Item Textures",
|
"firmament.config.fixes.auto-sprint": "Auto Sprint",
|
||||||
"firmament.config.custom-skyblock-textures.cache-duration": "Model Cache Duration",
|
"firmament.config.custom-skyblock-textures": "Custom SkyBlock Item Textures",
|
||||||
"firmament.config.custom-skyblock-textures.enabled": "Enable Custom Item Textures",
|
"firmament.config.custom-skyblock-textures.cache-duration": "Model Cache Duration",
|
||||||
"firmament.config.fixes": "Fixes",
|
"firmament.config.custom-skyblock-textures.enabled": "Enable Custom Item Textures",
|
||||||
"firmament.config.fixes.player-skins": "Fix unsigned Player Skins"
|
"firmament.config.fixes": "Fixes",
|
||||||
|
"firmament.config.fixes.player-skins": "Fix unsigned Player Skins"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user