diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-10-01 18:45:07 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-10-01 18:45:07 +0200 |
commit | 6294c1e84663a92964326105c4e25bc970a29394 (patch) | |
tree | 5cc945d0339a7fd3cb07aa10ede41d95e9ad75c4 /src/main/java/at/hannibal2/skyhanni | |
parent | 0c3a018c20392f88f746e68a12ca016acab3d1c4 (diff) | |
download | skyhanni-6294c1e84663a92964326105c4e25bc970a29394.tar.gz skyhanni-6294c1e84663a92964326105c4e25bc970a29394.tar.bz2 skyhanni-6294c1e84663a92964326105c4e25bc970a29394.zip |
removed some @JvmStatic calls
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
8 files changed, 4 insertions, 15 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java index 4c1d19168..7aef3f50b 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java @@ -156,14 +156,14 @@ public class SkyHanniMod { registerEvent(new NonGodPotEffectDisplay()); registerEvent(new HideBlazeParticles()); - Commands.init(); + Commands.INSTANCE.init(); registerEvent(new LorenzTest()); registerEvent(new ButtonOnPause()); configManager = new ConfigManager(); configManager.firstLoad(); - MinecraftConsoleFilter.initLogging(); + MinecraftConsoleFilter.Companion.initLogging(); Runtime.getRuntime().addShutdownHook(new Thread(configManager::saveConfig)); diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java index 1f12d920b..f04d6f95b 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Features.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java @@ -104,7 +104,7 @@ public class Features extends Config { } if (runnableId.equals("markOwnPlayer")) { - MarkedPlayerManager.toggleOwn(); + MarkedPlayerManager.Companion.toggleOwn(); return; } diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 808e51e56..d9711dd77 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -23,7 +23,6 @@ object Commands { } } - @JvmStatic fun init() { registerCommand("sh", openMainMenu) registerCommand("skyhanni", openMainMenu) diff --git a/src/main/java/at/hannibal2/skyhanni/features/MarkedPlayerManager.kt b/src/main/java/at/hannibal2/skyhanni/features/MarkedPlayerManager.kt index e8dba9735..b1c1ac4e8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/MarkedPlayerManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/MarkedPlayerManager.kt @@ -61,7 +61,6 @@ class MarkedPlayerManager { fun isMarkedPlayer(player: String): Boolean = player.lowercase() in playerNamesToMark - @JvmStatic fun toggleOwn() { val ownName = SkyHanniMod.feature.markedPlayers.markOwnName val name = Minecraft.getMinecraft().thePlayer.name diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderGlobalHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderGlobalHook.kt index 0ae72fddf..0558aa955 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderGlobalHook.kt +++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderGlobalHook.kt @@ -6,7 +6,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo class RenderGlobalHook { companion object { - @JvmStatic fun spawnParticle( particleId: Int, x: Double, diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinRenderGlobal.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinRenderGlobal.java index e658c3c02..8d5f58127 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinRenderGlobal.java +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinRenderGlobal.java @@ -12,6 +12,6 @@ public class MixinRenderGlobal { @Inject(method = "spawnParticle(IZDDDDDD[I)V", at = @At("HEAD"), cancellable = true) private void spawnParticle(int particleId, boolean ignoreRange, double x, double y, double z, double xOffset, double yOffset, double zOffset, int[] p_180442_15_, CallbackInfo ci) { - RenderGlobalHook.spawnParticle(particleId, x, y, z, ci); + RenderGlobalHook.Companion.spawnParticle(particleId, x, y, z, ci); } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt index e7ef6d653..c0e64c7be 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt @@ -19,7 +19,6 @@ class MinecraftConsoleFilter(private val loggerConfigName: String) : Filter { private val patternBiomeIdBounds = Pattern.compile("Biome ID is out of bounds: (\\d+), defaulting to 0 \\(Ocean\\)") companion object { - @JvmStatic fun initLogging() { val ctx: LoggerContext = LogManager.getContext(false) as LoggerContext diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt index 86829a4b0..d8e619d78 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt @@ -54,13 +54,6 @@ object NumberUtil { return if (hasDecimal) (truncated / 10.0).toString() + suffix else (truncated / 10).toString() + suffix } - @JvmStatic - fun unformat(value: String): Long { - val suffix = value.filter { !it.isDigit() }.lowercase() - val num = value.filter { it.isDigit() }.toLong() - return num * (suffixes.entries.find { it.value.lowercase() == suffix }?.key ?: 1) - } - /** * This code was unmodified and taken under CC BY-SA 3.0 license * @link https://stackoverflow.com/a/22186845 |