diff --git a/README.md b/README.md
index 549909a..2f0556b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
Swing
@@ -14,18 +14,31 @@
-Client-only Fabric mod for Minecraft 26.2. Scales down the item in your first-person hand and lets you slow the swing animation. Nothing on the server changes, so this is visual only.
+Client-only Fabric mod for Minecraft 26.2. Tweaks your first-person viewmodel — item scale, swing speed, positional offsets, and tilt. Nothing server-side changes.
I made this because the usual "viewmodel" skyblock mods come packed with a pile of extra features I already get from other mods.
## Settings
-In game, run `/swing`. That opens a dark settings panel with sliders and a number box for each value (0.10–1.00, step 0.01). Defaults are vanilla `1.00` / `1.00`. Values apply live, save to `config/swing.json` on Apply or Close, and reload next launch.
+Run `/swing` in game. A scrollable dark settings panel opens with sliders and number boxes for every value. Changes apply live, save to `config/swing.json` on close, and reload on next launch. All defaults are vanilla.
-- Held item scale: size of the first-person held item. `1.00` is vanilla.
-- Swing speed: arm swing animation. `1.00` is vanilla; lower is slower.
+### Swing speed
+- **Swing speed** (`1.00` = vanilla, lower is slower) — visual only, no server-side combat change
+- **Ignore Haste** toggle — when ON, the animation ignores haste / mining fatigue so swing speed stays constant across gear sets and islands
-Scaling does not apply in third person / F5.
+### Held item scale
+- **Held item scale** (`1.00` = vanilla) — scales the first-person item model
+- **Apply Hand Scale** toggle — when ON, also scales the bare arm mesh when holding nothing
+
+### Item offsets & tilt
+- **Item X / Y / Z** — positional offset for the held item model (`-1.00` to `1.00`)
+- **Item Pitch / Roll** — X and Z rotation for the held item (`-90` to `90°`)
+
+### Arm offsets & tilt (requires Apply Hand Scale ON)
+- **Arm X / Y / Z** — positional offset for the bare arm (`-1.00` to `1.00`)
+- **Arm Pitch / Roll** — X and Z rotation for the bare arm (`-90` to `90°`)
+
+Scaling and offsets do not apply in third person / F5.
## Build
@@ -35,7 +48,7 @@ Needs JDK 25.
./gradlew build
```
-Use `build/libs/fabric-swing-1.0.0.jar`. Skip the `-sources` jar.
+Use `build/libs/fabric-swing-1.5.0.jar`. Skip the `-sources` jar.
Dev launch:
diff --git a/build.gradle b/build.gradle
index 9f72334..cfb87be 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,23 +1,11 @@
plugins {
id 'net.fabricmc.fabric-loom' version "${loom_version}"
- id 'maven-publish'
-}
-
-repositories {
- // Add repositories to retrieve artifacts from in here.
- // You should only use this when depending on other mods because
- // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
- // See https://docs.gradle.org/current/userguide/declaring_repositories.html
- // for more information about repositories.
}
loom {
- splitEnvironmentSourceSets()
-
mods {
- "itemtweaks" {
+ "swing" {
sourceSet sourceSets.main
- sourceSet sourceSets.client
}
}
}
@@ -26,8 +14,6 @@ dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
implementation "net.fabricmc:fabric-loader:${project.loader_version}"
-
- // Fabric API. This is technically optional, but you probably want it anyway.
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
}
@@ -45,9 +31,7 @@ tasks.withType(JavaCompile).configureEach {
}
java {
- // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
- // if it is present.
- // If you remove this line, sources will not be generated.
+ // Builds a sources jar alongside the mod jar — useful for local dev and publishing.
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_25
@@ -59,23 +43,6 @@ jar {
inputs.property "projectName", projectName
from("LICENSE") {
- rename { "${it}_$projectName"}
- }
-}
-
-// configure the maven publication
-publishing {
- publications {
- create("mavenJava", MavenPublication) {
- from components.java
- }
- }
-
- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
- repositories {
- // Add repositories to publish to here.
- // Notice: This block does NOT have the same function as the block in the top level.
- // The repositories here will be used for publishing your artifact, not for
- // retrieving dependencies.
+ rename { "${it}_$projectName" }
}
}
diff --git a/gradle.properties b/gradle.properties
index fc235ee..4faa5a8 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,19 +1,15 @@
-# Done to increase the memory available to gradle.
-org.gradle.jvmargs=-Xmx2G
+org.gradle.jvmargs=-Xmx4G
org.gradle.parallel=true
org.gradle.configuration-cache=true
-# Fabric Properties (pinned to Spencer's setup: MC 26.2 + Loader 0.19.5; verified 2026-10-15)
-# check these on https://fabricmc.net/develop
-# NOTE: since MC 26.1 Minecraft ships unobfuscated, so there is no yarn/mappings line any more -
-# Loom uses Mojang's official names directly.
+
minecraft_version=26.2
loader_version=0.19.5
loom_version=1.18.4
# Mod Properties
-version=1.0.0
-group=com.example.itemtweaks
+version=1.5.0
+group=com.flapjacck.swing
# Dependencies
fabric_api_version=0.161.0+26.2
diff --git a/src/client/java/com/example/itemtweaks/client/ItemTweaksClient.java b/src/client/java/com/example/itemtweaks/client/ItemTweaksClient.java
deleted file mode 100644
index 6ea3869..0000000
--- a/src/client/java/com/example/itemtweaks/client/ItemTweaksClient.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.example.itemtweaks.client;
-
-import com.example.itemtweaks.ItemTweaks;
-import com.example.itemtweaks.ItemTweaksConfig;
-
-import net.fabricmc.api.ClientModInitializer;
-
-public class ItemTweaksClient implements ClientModInitializer {
- @Override
- public void onInitializeClient() {
- ItemTweaksConfig.load();
- SwingCommandHandler.register();
- ItemTweaks.LOGGER.info("Swing loaded (scale {}, swing x{})",
- ItemTweaksConfig.HELD_ITEM_SCALE,
- ItemTweaksConfig.SWING_SPEED_MULTIPLIER);
- }
-}
diff --git a/src/client/resources/swing.client.mixins.json b/src/client/resources/swing.client.mixins.json
deleted file mode 100644
index 114f3f0..0000000
--- a/src/client/resources/swing.client.mixins.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "required": true,
- "package": "com.example.itemtweaks.client.mixin",
- "compatibilityLevel": "JAVA_25",
- "client": [
- "ItemInHandRendererMixin",
- "ItemInHandRendererArmMixin"
- ],
- "injectors": {
- "defaultRequire": 1
- },
- "overwrites": {
- "requireAnnotations": true
- }
-}
diff --git a/src/main/java/com/example/itemtweaks/ItemTweaks.java b/src/main/java/com/example/itemtweaks/ItemTweaks.java
deleted file mode 100644
index 88fc8eb..0000000
--- a/src/main/java/com/example/itemtweaks/ItemTweaks.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.example.itemtweaks;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/** Shared id / logger. Mixins and the client entrypoint do the work. */
-public final class ItemTweaks {
- public static final String MOD_ID = "swing";
- public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
-
- private ItemTweaks() {}
-}
diff --git a/src/main/java/com/flapjacck/swing/Swing.java b/src/main/java/com/flapjacck/swing/Swing.java
new file mode 100644
index 0000000..4b344c1
--- /dev/null
+++ b/src/main/java/com/flapjacck/swing/Swing.java
@@ -0,0 +1,24 @@
+package com.flapjacck.swing;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.flapjacck.swing.command.SwingCommandHandler;
+import com.flapjacck.swing.config.SwingConfig;
+
+import net.fabricmc.api.ClientModInitializer;
+
+/** Client entrypoint — holds the mod ID, logger, and initialization. */
+public final class Swing implements ClientModInitializer {
+ public static final String MOD_ID = "swing";
+ public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
+
+ @Override
+ public void onInitializeClient() {
+ SwingConfig.load();
+ SwingCommandHandler.register();
+ LOGGER.info("Swing loaded (scale {}, swing x{})",
+ SwingConfig.HELD_ITEM_SCALE,
+ SwingConfig.SWING_SPEED_MULTIPLIER);
+ }
+}
diff --git a/src/client/java/com/example/itemtweaks/client/SwingCommandHandler.java b/src/main/java/com/flapjacck/swing/command/SwingCommandHandler.java
similarity index 78%
rename from src/client/java/com/example/itemtweaks/client/SwingCommandHandler.java
rename to src/main/java/com/flapjacck/swing/command/SwingCommandHandler.java
index ee6db43..7b43f14 100644
--- a/src/client/java/com/example/itemtweaks/client/SwingCommandHandler.java
+++ b/src/main/java/com/flapjacck/swing/command/SwingCommandHandler.java
@@ -1,11 +1,13 @@
-package com.example.itemtweaks.client;
+package com.flapjacck.swing.command;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommands.literal;
+import com.flapjacck.swing.screen.SwingSettingsScreen;
+
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.minecraft.client.Minecraft;
-/** {@code /swing} opens the in-game settings screen on the next client tick. */
+/** {@code /swing} opens the settings screen on the next client tick. */
public final class SwingCommandHandler {
private SwingCommandHandler() {}
diff --git a/src/main/java/com/example/itemtweaks/ItemTweaksConfig.java b/src/main/java/com/flapjacck/swing/config/SwingConfig.java
similarity index 94%
rename from src/main/java/com/example/itemtweaks/ItemTweaksConfig.java
rename to src/main/java/com/flapjacck/swing/config/SwingConfig.java
index c70d4ef..fddd312 100644
--- a/src/main/java/com/example/itemtweaks/ItemTweaksConfig.java
+++ b/src/main/java/com/flapjacck/swing/config/SwingConfig.java
@@ -1,4 +1,4 @@
-package com.example.itemtweaks;
+package com.flapjacck.swing.config;
import java.io.IOException;
import java.io.Reader;
@@ -6,6 +6,9 @@
import java.nio.file.Files;
import java.nio.file.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -16,7 +19,9 @@
* Live tweak values. Mixins read these every frame; GUI writes them in place.
* Persisted to {@code config/swing.json}.
*/
-public final class ItemTweaksConfig {
+public final class SwingConfig {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SwingConfig.class);
+
public static final float MIN = 0.1f;
public static final float MAX = 1.0f;
public static final float OFFSET_MIN = -1.0f;
@@ -39,7 +44,7 @@ public final class ItemTweaksConfig {
/**
* When true, the swing-duration mixin ignores haste / mining-fatigue and
* always starts from the vanilla base of 6 ticks before applying the
- * multiplier. Keeps animation speed constant across islands and gear sets.
+ * multiplier. Keeps animation speed constant across islands and gear sets.
*/
public static boolean IGNORE_HASTE = DEFAULT_IGNORE_HASTE;
@@ -82,7 +87,7 @@ public final class ItemTweaksConfig {
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
- private ItemTweaksConfig() {}
+ private SwingConfig() {}
public static float clamp(float value) {
return Math.round(Mth.clamp(value, MIN, MAX) * 100f) / 100f;
@@ -141,7 +146,7 @@ public static void load() {
ARM_TILT_PITCH = clampTilt(data.armTiltPitch);
ARM_TILT_ROLL = clampTilt(data.armTiltRoll);
} catch (Exception e) {
- ItemTweaks.LOGGER.warn("Could not read {}, using vanilla defaults", file, e);
+ LOGGER.warn("Could not read {}, using vanilla defaults", file, e);
resetToVanilla();
}
}
@@ -169,7 +174,7 @@ public static void save() {
GSON.toJson(data, writer);
}
} catch (IOException e) {
- ItemTweaks.LOGGER.warn("Could not write {}", file, e);
+ LOGGER.warn("Could not write {}", file, e);
}
}
diff --git a/src/client/java/com/example/itemtweaks/client/mixin/ItemInHandRendererArmMixin.java b/src/main/java/com/flapjacck/swing/mixin/ItemInHandRendererArmMixin.java
similarity index 63%
rename from src/client/java/com/example/itemtweaks/client/mixin/ItemInHandRendererArmMixin.java
rename to src/main/java/com/flapjacck/swing/mixin/ItemInHandRendererArmMixin.java
index 1d9e5b2..13e1b06 100644
--- a/src/client/java/com/example/itemtweaks/client/mixin/ItemInHandRendererArmMixin.java
+++ b/src/main/java/com/flapjacck/swing/mixin/ItemInHandRendererArmMixin.java
@@ -1,4 +1,4 @@
-package com.example.itemtweaks.client.mixin;
+package com.flapjacck.swing.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -12,7 +12,7 @@
import net.minecraft.client.renderer.entity.player.AvatarRenderer;
import net.minecraft.resources.Identifier;
-import com.example.itemtweaks.ItemTweaksConfig;
+import com.flapjacck.swing.config.SwingConfig;
/**
* ARM MESH TRANSFORM — bare hand only (empty-handed first-person).
@@ -20,8 +20,7 @@
* AvatarRenderer#renderRightHand / renderLeftHand render the actual arm mesh
* geometry in first-person. They are called from ItemInHandRenderer#renderPlayerArm
* only when the hand is EMPTY. All transforms here (offset, tilt, scale) are
- * therefore gated behind APPLY_HAND_SCALE so they only fire when the user has
- * opted in to arm customisation.
+ * gated behind APPLY_HAND_SCALE so they only fire when the user has opted in.
*
* Order: translate (offset) → rotate (tilt) → scale.
*/
@@ -29,62 +28,62 @@
public abstract class ItemInHandRendererArmMixin {
@Inject(method = "renderRightHand", at = @At("HEAD"))
- private void itemtweaks$transformRightArm(PoseStack poseStack, SubmitNodeCollector collector,
+ private void swing$transformRightArm(PoseStack poseStack, SubmitNodeCollector collector,
int light, Identifier skinTexture, boolean slim, CallbackInfo ci) {
- if (!ItemTweaksConfig.APPLY_HAND_SCALE) return;
+ if (!SwingConfig.APPLY_HAND_SCALE) return;
poseStack.pushPose();
// 1. Positional offset — separate values from the held item offsets.
- float ox = ItemTweaksConfig.ARM_OFFSET_X;
- float oy = ItemTweaksConfig.ARM_OFFSET_Y;
- float oz = ItemTweaksConfig.ARM_OFFSET_Z;
+ float ox = SwingConfig.ARM_OFFSET_X;
+ float oy = SwingConfig.ARM_OFFSET_Y;
+ float oz = SwingConfig.ARM_OFFSET_Z;
if (ox != 0.0f || oy != 0.0f || oz != 0.0f) poseStack.translate(ox, oy, oz);
// 2. Tilt — pitch (X) tips up/down; roll (Z) slants sideways.
- float pitch = ItemTweaksConfig.ARM_TILT_PITCH;
- float roll = ItemTweaksConfig.ARM_TILT_ROLL;
+ float pitch = SwingConfig.ARM_TILT_PITCH;
+ float roll = SwingConfig.ARM_TILT_ROLL;
if (pitch != 0.0f) poseStack.mulPose(Axis.XP.rotationDegrees(pitch));
if (roll != 0.0f) poseStack.mulPose(Axis.ZP.rotationDegrees(roll));
// 3. Scale.
- float s = ItemTweaksConfig.HELD_ITEM_SCALE;
+ float s = SwingConfig.HELD_ITEM_SCALE;
if (s != 1.0f) poseStack.scale(s, s, s);
}
@Inject(method = "renderRightHand", at = @At("RETURN"))
- private void itemtweaks$unscaleRightArm(PoseStack poseStack, SubmitNodeCollector collector,
+ private void swing$unscaleRightArm(PoseStack poseStack, SubmitNodeCollector collector,
int light, Identifier skinTexture, boolean slim, CallbackInfo ci) {
- if (!ItemTweaksConfig.APPLY_HAND_SCALE) return;
+ if (!SwingConfig.APPLY_HAND_SCALE) return;
poseStack.popPose();
}
@Inject(method = "renderLeftHand", at = @At("HEAD"))
- private void itemtweaks$transformLeftArm(PoseStack poseStack, SubmitNodeCollector collector,
+ private void swing$transformLeftArm(PoseStack poseStack, SubmitNodeCollector collector,
int light, Identifier skinTexture, boolean slim, CallbackInfo ci) {
- if (!ItemTweaksConfig.APPLY_HAND_SCALE) return;
+ if (!SwingConfig.APPLY_HAND_SCALE) return;
poseStack.pushPose();
// 1. Positional offset.
- float ox = ItemTweaksConfig.ARM_OFFSET_X;
- float oy = ItemTweaksConfig.ARM_OFFSET_Y;
- float oz = ItemTweaksConfig.ARM_OFFSET_Z;
+ float ox = SwingConfig.ARM_OFFSET_X;
+ float oy = SwingConfig.ARM_OFFSET_Y;
+ float oz = SwingConfig.ARM_OFFSET_Z;
if (ox != 0.0f || oy != 0.0f || oz != 0.0f) poseStack.translate(ox, oy, oz);
// 2. Tilt.
- float pitch = ItemTweaksConfig.ARM_TILT_PITCH;
- float roll = ItemTweaksConfig.ARM_TILT_ROLL;
+ float pitch = SwingConfig.ARM_TILT_PITCH;
+ float roll = SwingConfig.ARM_TILT_ROLL;
if (pitch != 0.0f) poseStack.mulPose(Axis.XP.rotationDegrees(pitch));
if (roll != 0.0f) poseStack.mulPose(Axis.ZP.rotationDegrees(roll));
// 3. Scale.
- float s = ItemTweaksConfig.HELD_ITEM_SCALE;
+ float s = SwingConfig.HELD_ITEM_SCALE;
if (s != 1.0f) poseStack.scale(s, s, s);
}
@Inject(method = "renderLeftHand", at = @At("RETURN"))
- private void itemtweaks$unscaleLeftArm(PoseStack poseStack, SubmitNodeCollector collector,
+ private void swing$unscaleLeftArm(PoseStack poseStack, SubmitNodeCollector collector,
int light, Identifier skinTexture, boolean slim, CallbackInfo ci) {
- if (!ItemTweaksConfig.APPLY_HAND_SCALE) return;
+ if (!SwingConfig.APPLY_HAND_SCALE) return;
poseStack.popPose();
}
}
diff --git a/src/client/java/com/example/itemtweaks/client/mixin/ItemInHandRendererMixin.java b/src/main/java/com/flapjacck/swing/mixin/ItemInHandRendererMixin.java
similarity index 74%
rename from src/client/java/com/example/itemtweaks/client/mixin/ItemInHandRendererMixin.java
rename to src/main/java/com/flapjacck/swing/mixin/ItemInHandRendererMixin.java
index 4f4345e..026f22c 100644
--- a/src/client/java/com/example/itemtweaks/client/mixin/ItemInHandRendererMixin.java
+++ b/src/main/java/com/flapjacck/swing/mixin/ItemInHandRendererMixin.java
@@ -1,4 +1,4 @@
-package com.example.itemtweaks.client.mixin;
+package com.flapjacck.swing.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -14,7 +14,7 @@
import net.minecraft.world.item.ItemDisplayContext;
import net.minecraft.world.item.ItemStack;
-import com.example.itemtweaks.ItemTweaksConfig;
+import com.flapjacck.swing.config.SwingConfig;
/**
* FIRST-PERSON HELD ITEM TRANSFORM (item model only).
@@ -25,33 +25,33 @@
@Mixin(ItemInHandRenderer.class)
public abstract class ItemInHandRendererMixin {
@Inject(method = "renderItem", at = @At("HEAD"))
- private void itemtweaks$pushAndTransform(LivingEntity entity, ItemStack stack, ItemDisplayContext ctx,
+ private void swing$pushAndTransform(LivingEntity entity, ItemStack stack, ItemDisplayContext ctx,
PoseStack poseStack, SubmitNodeCollector collector, int light, CallbackInfo ci) {
poseStack.pushPose();
// 1. Positional offset — applied first, in vanilla model space.
- float ox = ItemTweaksConfig.HELD_ITEM_OFFSET_X;
- float oy = ItemTweaksConfig.HELD_ITEM_OFFSET_Y;
- float oz = ItemTweaksConfig.HELD_ITEM_OFFSET_Z;
+ float ox = SwingConfig.HELD_ITEM_OFFSET_X;
+ float oy = SwingConfig.HELD_ITEM_OFFSET_Y;
+ float oz = SwingConfig.HELD_ITEM_OFFSET_Z;
if (ox != 0.0f || oy != 0.0f || oz != 0.0f) {
poseStack.translate(ox, oy, oz);
}
// 2. Tilt — pitch (X-axis) tips the item up/down; roll (Z-axis) slants it sideways.
- float pitch = ItemTweaksConfig.ITEM_TILT_PITCH;
- float roll = ItemTweaksConfig.ITEM_TILT_ROLL;
+ float pitch = SwingConfig.ITEM_TILT_PITCH;
+ float roll = SwingConfig.ITEM_TILT_ROLL;
if (pitch != 0.0f) poseStack.mulPose(Axis.XP.rotationDegrees(pitch));
if (roll != 0.0f) poseStack.mulPose(Axis.ZP.rotationDegrees(roll));
// 3. Scale.
- float s = ItemTweaksConfig.HELD_ITEM_SCALE;
+ float s = SwingConfig.HELD_ITEM_SCALE;
if (s != 1.0f) {
poseStack.scale(s, s, s);
}
}
@Inject(method = "renderItem", at = @At("RETURN"))
- private void itemtweaks$pop(LivingEntity entity, ItemStack stack, ItemDisplayContext ctx,
+ private void swing$pop(LivingEntity entity, ItemStack stack, ItemDisplayContext ctx,
PoseStack poseStack, SubmitNodeCollector collector, int light, CallbackInfo ci) {
poseStack.popPose();
}
diff --git a/src/main/java/com/example/itemtweaks/mixin/LivingEntitySwingMixin.java b/src/main/java/com/flapjacck/swing/mixin/LivingEntitySwingMixin.java
similarity index 77%
rename from src/main/java/com/example/itemtweaks/mixin/LivingEntitySwingMixin.java
rename to src/main/java/com/flapjacck/swing/mixin/LivingEntitySwingMixin.java
index 4f4dae3..69b6bdd 100644
--- a/src/main/java/com/example/itemtweaks/mixin/LivingEntitySwingMixin.java
+++ b/src/main/java/com/flapjacck/swing/mixin/LivingEntitySwingMixin.java
@@ -1,4 +1,4 @@
-package com.example.itemtweaks.mixin;
+package com.flapjacck.swing.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -7,7 +7,7 @@
import net.minecraft.world.entity.LivingEntity;
-import com.example.itemtweaks.ItemTweaksConfig;
+import com.flapjacck.swing.config.SwingConfig;
/**
* VISUAL SWING ANIMATION SPEED (client only).
@@ -25,18 +25,19 @@ public abstract class LivingEntitySwingMixin {
private static final int VANILLA_BASE_DURATION = 6;
@Inject(method = "getCurrentSwingDuration", at = @At("RETURN"), cancellable = true)
- private void itemtweaks$scaleSwingDuration(CallbackInfoReturnable cir) {
- float mult = ItemTweaksConfig.SWING_SPEED_MULTIPLIER;
+ private void swing$scaleSwingDuration(CallbackInfoReturnable cir) {
+ float mult = SwingConfig.SWING_SPEED_MULTIPLIER;
// Determine the base duration to scale from.
// When ignoreHaste is on, always use the no-haste base so the animation
// is identical everywhere regardless of active status effects or gear.
- int base = ItemTweaksConfig.IGNORE_HASTE ? VANILLA_BASE_DURATION : cir.getReturnValueI();
+ int base = SwingConfig.IGNORE_HASTE ? VANILLA_BASE_DURATION : cir.getReturnValueI();
- if (mult == 1.0f && !ItemTweaksConfig.IGNORE_HASTE) return; // nothing to change
+ if (mult == 1.0f && !SwingConfig.IGNORE_HASTE) return; // nothing to change
if (mult <= 0f) return;
// Must stay >= 1 tick or the swing never completes properly.
cir.setReturnValue(Math.max(1, Math.round(base / mult)));
}
}
+
diff --git a/src/client/java/com/example/itemtweaks/client/SwingSettingsScreen.java b/src/main/java/com/flapjacck/swing/screen/SwingSettingsScreen.java
similarity index 78%
rename from src/client/java/com/example/itemtweaks/client/SwingSettingsScreen.java
rename to src/main/java/com/flapjacck/swing/screen/SwingSettingsScreen.java
index e29de38..2d2e354 100644
--- a/src/client/java/com/example/itemtweaks/client/SwingSettingsScreen.java
+++ b/src/main/java/com/flapjacck/swing/screen/SwingSettingsScreen.java
@@ -1,9 +1,9 @@
-package com.example.itemtweaks.client;
+package com.flapjacck.swing.screen;
import java.util.Locale;
import java.util.function.DoubleConsumer;
-import com.example.itemtweaks.ItemTweaksConfig;
+import com.flapjacck.swing.config.SwingConfig;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.GuiGraphicsExtractor;
@@ -122,62 +122,62 @@ public SwingSettingsScreen() {
protected void init() {
int px = panelX(), py = panelY();
int inner = px + PAD;
- float omin = ItemTweaksConfig.OFFSET_MIN, omax = ItemTweaksConfig.OFFSET_MAX;
- float tmin = ItemTweaksConfig.TILT_MIN, tmax = ItemTweaksConfig.TILT_MAX;
+ float omin = SwingConfig.OFFSET_MIN, omax = SwingConfig.OFFSET_MAX;
+ float tmin = SwingConfig.TILT_MIN, tmax = SwingConfig.TILT_MAX;
// — Section 1: Swing speed —
this.swingSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Swing speed", ItemTweaksConfig.SWING_SPEED_MULTIPLIER, this::applySwing, this.font));
- this.swingBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.SWING_SPEED_MULTIPLIER, this::applySwing);
+ "Swing speed", SwingConfig.SWING_SPEED_MULTIPLIER, this::applySwing, this.font));
+ this.swingBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.SWING_SPEED_MULTIPLIER, this::applySwing);
this.hasteToggleBtn = addRenderableWidget(Button.builder(
Component.literal(hasteToggleLabel()), b -> toggleIgnoreHaste())
.bounds(inner, 0, SLIDER_W + 8 + BOX_W, CTRL_H).build());
// — Section 2: Held item scale —
this.scaleSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Held item scale", ItemTweaksConfig.HELD_ITEM_SCALE, this::applyScale, this.font));
- this.scaleBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.HELD_ITEM_SCALE, this::applyScale);
+ "Held item scale", SwingConfig.HELD_ITEM_SCALE, this::applyScale, this.font));
+ this.scaleBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.HELD_ITEM_SCALE, this::applyScale);
this.handScaleToggleBtn = addRenderableWidget(Button.builder(
Component.literal(handScaleToggleLabel()), b -> toggleApplyHandScale())
.bounds(inner, 0, SLIDER_W + 8 + BOX_W, CTRL_H).build());
// — Section 3: Item offsets —
this.itemOffsetXSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Item X", ItemTweaksConfig.HELD_ITEM_OFFSET_X, this::applyItemOffsetX, this.font, omin, omax));
- this.itemOffsetXBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.HELD_ITEM_OFFSET_X, this::applyItemOffsetX);
+ "Item X", SwingConfig.HELD_ITEM_OFFSET_X, this::applyItemOffsetX, this.font, omin, omax));
+ this.itemOffsetXBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.HELD_ITEM_OFFSET_X, this::applyItemOffsetX);
this.itemOffsetYSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Item Y", ItemTweaksConfig.HELD_ITEM_OFFSET_Y, this::applyItemOffsetY, this.font, omin, omax));
- this.itemOffsetYBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.HELD_ITEM_OFFSET_Y, this::applyItemOffsetY);
+ "Item Y", SwingConfig.HELD_ITEM_OFFSET_Y, this::applyItemOffsetY, this.font, omin, omax));
+ this.itemOffsetYBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.HELD_ITEM_OFFSET_Y, this::applyItemOffsetY);
this.itemOffsetZSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Item Z", ItemTweaksConfig.HELD_ITEM_OFFSET_Z, this::applyItemOffsetZ, this.font, omin, omax));
- this.itemOffsetZBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.HELD_ITEM_OFFSET_Z, this::applyItemOffsetZ);
+ "Item Z", SwingConfig.HELD_ITEM_OFFSET_Z, this::applyItemOffsetZ, this.font, omin, omax));
+ this.itemOffsetZBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.HELD_ITEM_OFFSET_Z, this::applyItemOffsetZ);
// — Section 4: Item tilt —
this.itemTiltPitchSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Item Pitch", ItemTweaksConfig.ITEM_TILT_PITCH, this::applyItemTiltPitch, this.font, tmin, tmax));
- this.itemTiltPitchBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.ITEM_TILT_PITCH, this::applyItemTiltPitch);
+ "Item Pitch", SwingConfig.ITEM_TILT_PITCH, this::applyItemTiltPitch, this.font, tmin, tmax));
+ this.itemTiltPitchBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.ITEM_TILT_PITCH, this::applyItemTiltPitch);
this.itemTiltRollSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Item Roll", ItemTweaksConfig.ITEM_TILT_ROLL, this::applyItemTiltRoll, this.font, tmin, tmax));
- this.itemTiltRollBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.ITEM_TILT_ROLL, this::applyItemTiltRoll);
+ "Item Roll", SwingConfig.ITEM_TILT_ROLL, this::applyItemTiltRoll, this.font, tmin, tmax));
+ this.itemTiltRollBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.ITEM_TILT_ROLL, this::applyItemTiltRoll);
// — Section 5: Arm offsets —
this.armOffsetXSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Arm X", ItemTweaksConfig.ARM_OFFSET_X, this::applyArmOffsetX, this.font, omin, omax));
- this.armOffsetXBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.ARM_OFFSET_X, this::applyArmOffsetX);
+ "Arm X", SwingConfig.ARM_OFFSET_X, this::applyArmOffsetX, this.font, omin, omax));
+ this.armOffsetXBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.ARM_OFFSET_X, this::applyArmOffsetX);
this.armOffsetYSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Arm Y", ItemTweaksConfig.ARM_OFFSET_Y, this::applyArmOffsetY, this.font, omin, omax));
- this.armOffsetYBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.ARM_OFFSET_Y, this::applyArmOffsetY);
+ "Arm Y", SwingConfig.ARM_OFFSET_Y, this::applyArmOffsetY, this.font, omin, omax));
+ this.armOffsetYBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.ARM_OFFSET_Y, this::applyArmOffsetY);
this.armOffsetZSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Arm Z", ItemTweaksConfig.ARM_OFFSET_Z, this::applyArmOffsetZ, this.font, omin, omax));
- this.armOffsetZBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.ARM_OFFSET_Z, this::applyArmOffsetZ);
+ "Arm Z", SwingConfig.ARM_OFFSET_Z, this::applyArmOffsetZ, this.font, omin, omax));
+ this.armOffsetZBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.ARM_OFFSET_Z, this::applyArmOffsetZ);
// — Section 6: Arm tilt —
this.armTiltPitchSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Arm Pitch", ItemTweaksConfig.ARM_TILT_PITCH, this::applyArmTiltPitch, this.font, tmin, tmax));
- this.armTiltPitchBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.ARM_TILT_PITCH, this::applyArmTiltPitch);
+ "Arm Pitch", SwingConfig.ARM_TILT_PITCH, this::applyArmTiltPitch, this.font, tmin, tmax));
+ this.armTiltPitchBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.ARM_TILT_PITCH, this::applyArmTiltPitch);
this.armTiltRollSlider = addRenderableWidget(new FloatSlider(inner, 0, SLIDER_W, CTRL_H,
- "Arm Roll", ItemTweaksConfig.ARM_TILT_ROLL, this::applyArmTiltRoll, this.font, tmin, tmax));
- this.armTiltRollBox = addBox(inner + SLIDER_W + 8, 0, ItemTweaksConfig.ARM_TILT_ROLL, this::applyArmTiltRoll);
+ "Arm Roll", SwingConfig.ARM_TILT_ROLL, this::applyArmTiltRoll, this.font, tmin, tmax));
+ this.armTiltRollBox = addBox(inner + SLIDER_W + 8, 0, SwingConfig.ARM_TILT_ROLL, this::applyArmTiltRoll);
repositionScrollableWidgets();
@@ -264,19 +264,19 @@ private EditBox addBox(int x, int y, float value, DoubleConsumer apply) {
// ── Toggle labels & handlers ─────────────────────────────────────────────────
private static String hasteToggleLabel() {
- return ItemTweaksConfig.IGNORE_HASTE ? "Ignore Haste: ON" : "Ignore Haste: OFF";
+ return SwingConfig.IGNORE_HASTE ? "Ignore Haste: ON" : "Ignore Haste: OFF";
}
private void toggleIgnoreHaste() {
- ItemTweaksConfig.IGNORE_HASTE = !ItemTweaksConfig.IGNORE_HASTE;
+ SwingConfig.IGNORE_HASTE = !SwingConfig.IGNORE_HASTE;
if (this.hasteToggleBtn != null)
this.hasteToggleBtn.setMessage(Component.literal(hasteToggleLabel()));
}
private static String handScaleToggleLabel() {
- return ItemTweaksConfig.APPLY_HAND_SCALE ? "Apply Hand Scale: ON" : "Apply Hand Scale: OFF";
+ return SwingConfig.APPLY_HAND_SCALE ? "Apply Hand Scale: ON" : "Apply Hand Scale: OFF";
}
private void toggleApplyHandScale() {
- ItemTweaksConfig.APPLY_HAND_SCALE = !ItemTweaksConfig.APPLY_HAND_SCALE;
+ SwingConfig.APPLY_HAND_SCALE = !SwingConfig.APPLY_HAND_SCALE;
if (this.handScaleToggleBtn != null)
this.handScaleToggleBtn.setMessage(Component.literal(handScaleToggleLabel()));
}
@@ -284,63 +284,63 @@ private void toggleApplyHandScale() {
// ── Apply callbacks ──────────────────────────────────────────────────────────
private void applySwing(double raw) {
- float v = ItemTweaksConfig.clamp((float) raw);
- ItemTweaksConfig.SWING_SPEED_MULTIPLIER = v;
+ float v = SwingConfig.clamp((float) raw);
+ SwingConfig.SWING_SPEED_MULTIPLIER = v;
sync(this.swingSlider, this.swingBox, v);
}
private void applyScale(double raw) {
- float v = ItemTweaksConfig.clamp((float) raw);
- ItemTweaksConfig.HELD_ITEM_SCALE = v;
+ float v = SwingConfig.clamp((float) raw);
+ SwingConfig.HELD_ITEM_SCALE = v;
sync(this.scaleSlider, this.scaleBox, v);
}
private void applyItemOffsetX(double raw) {
- float v = ItemTweaksConfig.clampOffset((float) raw);
- ItemTweaksConfig.HELD_ITEM_OFFSET_X = v;
+ float v = SwingConfig.clampOffset((float) raw);
+ SwingConfig.HELD_ITEM_OFFSET_X = v;
sync(this.itemOffsetXSlider, this.itemOffsetXBox, v);
}
private void applyItemOffsetY(double raw) {
- float v = ItemTweaksConfig.clampOffset((float) raw);
- ItemTweaksConfig.HELD_ITEM_OFFSET_Y = v;
+ float v = SwingConfig.clampOffset((float) raw);
+ SwingConfig.HELD_ITEM_OFFSET_Y = v;
sync(this.itemOffsetYSlider, this.itemOffsetYBox, v);
}
private void applyItemOffsetZ(double raw) {
- float v = ItemTweaksConfig.clampOffset((float) raw);
- ItemTweaksConfig.HELD_ITEM_OFFSET_Z = v;
+ float v = SwingConfig.clampOffset((float) raw);
+ SwingConfig.HELD_ITEM_OFFSET_Z = v;
sync(this.itemOffsetZSlider, this.itemOffsetZBox, v);
}
private void applyItemTiltPitch(double raw) {
- float v = ItemTweaksConfig.clampTilt((float) raw);
- ItemTweaksConfig.ITEM_TILT_PITCH = v;
+ float v = SwingConfig.clampTilt((float) raw);
+ SwingConfig.ITEM_TILT_PITCH = v;
sync(this.itemTiltPitchSlider, this.itemTiltPitchBox, v);
}
private void applyItemTiltRoll(double raw) {
- float v = ItemTweaksConfig.clampTilt((float) raw);
- ItemTweaksConfig.ITEM_TILT_ROLL = v;
+ float v = SwingConfig.clampTilt((float) raw);
+ SwingConfig.ITEM_TILT_ROLL = v;
sync(this.itemTiltRollSlider, this.itemTiltRollBox, v);
}
private void applyArmOffsetX(double raw) {
- float v = ItemTweaksConfig.clampOffset((float) raw);
- ItemTweaksConfig.ARM_OFFSET_X = v;
+ float v = SwingConfig.clampOffset((float) raw);
+ SwingConfig.ARM_OFFSET_X = v;
sync(this.armOffsetXSlider, this.armOffsetXBox, v);
}
private void applyArmOffsetY(double raw) {
- float v = ItemTweaksConfig.clampOffset((float) raw);
- ItemTweaksConfig.ARM_OFFSET_Y = v;
+ float v = SwingConfig.clampOffset((float) raw);
+ SwingConfig.ARM_OFFSET_Y = v;
sync(this.armOffsetYSlider, this.armOffsetYBox, v);
}
private void applyArmOffsetZ(double raw) {
- float v = ItemTweaksConfig.clampOffset((float) raw);
- ItemTweaksConfig.ARM_OFFSET_Z = v;
+ float v = SwingConfig.clampOffset((float) raw);
+ SwingConfig.ARM_OFFSET_Z = v;
sync(this.armOffsetZSlider, this.armOffsetZBox, v);
}
private void applyArmTiltPitch(double raw) {
- float v = ItemTweaksConfig.clampTilt((float) raw);
- ItemTweaksConfig.ARM_TILT_PITCH = v;
+ float v = SwingConfig.clampTilt((float) raw);
+ SwingConfig.ARM_TILT_PITCH = v;
sync(this.armTiltPitchSlider, this.armTiltPitchBox, v);
}
private void applyArmTiltRoll(double raw) {
- float v = ItemTweaksConfig.clampTilt((float) raw);
- ItemTweaksConfig.ARM_TILT_ROLL = v;
+ float v = SwingConfig.clampTilt((float) raw);
+ SwingConfig.ARM_TILT_ROLL = v;
sync(this.armTiltRollSlider, this.armTiltRollBox, v);
}
@@ -363,40 +363,40 @@ private void onResetClick() {
}
this.resetArmed = false;
this.resetBtn.setMessage(Component.literal("Reset"));
- ItemTweaksConfig.resetToVanilla();
+ SwingConfig.resetToVanilla();
this.syncing = true;
// Section 1
- this.swingSlider.setFromFloat(ItemTweaksConfig.SWING_SPEED_MULTIPLIER);
- this.swingBox.setValue(fmt(ItemTweaksConfig.SWING_SPEED_MULTIPLIER));
+ this.swingSlider.setFromFloat(SwingConfig.SWING_SPEED_MULTIPLIER);
+ this.swingBox.setValue(fmt(SwingConfig.SWING_SPEED_MULTIPLIER));
this.hasteToggleBtn.setMessage(Component.literal(hasteToggleLabel()));
// Section 2
- this.scaleSlider.setFromFloat(ItemTweaksConfig.HELD_ITEM_SCALE);
- this.scaleBox.setValue(fmt(ItemTweaksConfig.HELD_ITEM_SCALE));
+ this.scaleSlider.setFromFloat(SwingConfig.HELD_ITEM_SCALE);
+ this.scaleBox.setValue(fmt(SwingConfig.HELD_ITEM_SCALE));
this.handScaleToggleBtn.setMessage(Component.literal(handScaleToggleLabel()));
// Section 3
- this.itemOffsetXSlider.setFromFloat(ItemTweaksConfig.HELD_ITEM_OFFSET_X);
- this.itemOffsetXBox.setValue(fmt(ItemTweaksConfig.HELD_ITEM_OFFSET_X));
- this.itemOffsetYSlider.setFromFloat(ItemTweaksConfig.HELD_ITEM_OFFSET_Y);
- this.itemOffsetYBox.setValue(fmt(ItemTweaksConfig.HELD_ITEM_OFFSET_Y));
- this.itemOffsetZSlider.setFromFloat(ItemTweaksConfig.HELD_ITEM_OFFSET_Z);
- this.itemOffsetZBox.setValue(fmt(ItemTweaksConfig.HELD_ITEM_OFFSET_Z));
+ this.itemOffsetXSlider.setFromFloat(SwingConfig.HELD_ITEM_OFFSET_X);
+ this.itemOffsetXBox.setValue(fmt(SwingConfig.HELD_ITEM_OFFSET_X));
+ this.itemOffsetYSlider.setFromFloat(SwingConfig.HELD_ITEM_OFFSET_Y);
+ this.itemOffsetYBox.setValue(fmt(SwingConfig.HELD_ITEM_OFFSET_Y));
+ this.itemOffsetZSlider.setFromFloat(SwingConfig.HELD_ITEM_OFFSET_Z);
+ this.itemOffsetZBox.setValue(fmt(SwingConfig.HELD_ITEM_OFFSET_Z));
// Section 4
- this.itemTiltPitchSlider.setFromFloat(ItemTweaksConfig.ITEM_TILT_PITCH);
- this.itemTiltPitchBox.setValue(fmt(ItemTweaksConfig.ITEM_TILT_PITCH));
- this.itemTiltRollSlider.setFromFloat(ItemTweaksConfig.ITEM_TILT_ROLL);
- this.itemTiltRollBox.setValue(fmt(ItemTweaksConfig.ITEM_TILT_ROLL));
+ this.itemTiltPitchSlider.setFromFloat(SwingConfig.ITEM_TILT_PITCH);
+ this.itemTiltPitchBox.setValue(fmt(SwingConfig.ITEM_TILT_PITCH));
+ this.itemTiltRollSlider.setFromFloat(SwingConfig.ITEM_TILT_ROLL);
+ this.itemTiltRollBox.setValue(fmt(SwingConfig.ITEM_TILT_ROLL));
// Section 5
- this.armOffsetXSlider.setFromFloat(ItemTweaksConfig.ARM_OFFSET_X);
- this.armOffsetXBox.setValue(fmt(ItemTweaksConfig.ARM_OFFSET_X));
- this.armOffsetYSlider.setFromFloat(ItemTweaksConfig.ARM_OFFSET_Y);
- this.armOffsetYBox.setValue(fmt(ItemTweaksConfig.ARM_OFFSET_Y));
- this.armOffsetZSlider.setFromFloat(ItemTweaksConfig.ARM_OFFSET_Z);
- this.armOffsetZBox.setValue(fmt(ItemTweaksConfig.ARM_OFFSET_Z));
+ this.armOffsetXSlider.setFromFloat(SwingConfig.ARM_OFFSET_X);
+ this.armOffsetXBox.setValue(fmt(SwingConfig.ARM_OFFSET_X));
+ this.armOffsetYSlider.setFromFloat(SwingConfig.ARM_OFFSET_Y);
+ this.armOffsetYBox.setValue(fmt(SwingConfig.ARM_OFFSET_Y));
+ this.armOffsetZSlider.setFromFloat(SwingConfig.ARM_OFFSET_Z);
+ this.armOffsetZBox.setValue(fmt(SwingConfig.ARM_OFFSET_Z));
// Section 6
- this.armTiltPitchSlider.setFromFloat(ItemTweaksConfig.ARM_TILT_PITCH);
- this.armTiltPitchBox.setValue(fmt(ItemTweaksConfig.ARM_TILT_PITCH));
- this.armTiltRollSlider.setFromFloat(ItemTweaksConfig.ARM_TILT_ROLL);
- this.armTiltRollBox.setValue(fmt(ItemTweaksConfig.ARM_TILT_ROLL));
+ this.armTiltPitchSlider.setFromFloat(SwingConfig.ARM_TILT_PITCH);
+ this.armTiltPitchBox.setValue(fmt(SwingConfig.ARM_TILT_PITCH));
+ this.armTiltRollSlider.setFromFloat(SwingConfig.ARM_TILT_ROLL);
+ this.armTiltRollBox.setValue(fmt(SwingConfig.ARM_TILT_ROLL));
this.syncing = false;
}
@@ -404,7 +404,7 @@ private void onResetClick() {
@Override
public void onClose() {
- ItemTweaksConfig.save();
+ SwingConfig.save();
super.onClose();
}
@@ -487,7 +487,7 @@ static final class FloatSlider extends AbstractSliderButton {
FloatSlider(int x, int y, int w, int h, String label, float current,
DoubleConsumer onChange, Font font) {
this(x, y, w, h, label, current, onChange, font,
- ItemTweaksConfig.MIN, ItemTweaksConfig.MAX);
+ SwingConfig.MIN, SwingConfig.MAX);
}
/** Full constructor — use for offset or tilt sliders with a custom range. */
diff --git a/src/main/resources/assets/itemtweaks/icon.png b/src/main/resources/assets/swing/icon.png
similarity index 100%
rename from src/main/resources/assets/itemtweaks/icon.png
rename to src/main/resources/assets/swing/icon.png
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 89765e5..701dc86 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -6,17 +6,13 @@
"description": "Client-only: first-person held item scale and visual swing speed.",
"authors": ["Spencer Kelly"],
"license": "CC0-1.0",
- "icon": "assets/itemtweaks/icon.png",
+ "icon": "assets/swing/icon.png",
"environment": "client",
"entrypoints": {
- "client": ["com.example.itemtweaks.client.ItemTweaksClient"]
+ "client": ["com.flapjacck.swing.Swing"]
},
"mixins": [
- "swing.mixins.json",
- {
- "config": "swing.client.mixins.json",
- "environment": "client"
- }
+ "swing.mixins.json"
],
"depends": {
"fabricloader": ">=0.19.5",
diff --git a/src/main/resources/swing.mixins.json b/src/main/resources/swing.mixins.json
index 4c6373d..7e3c127 100644
--- a/src/main/resources/swing.mixins.json
+++ b/src/main/resources/swing.mixins.json
@@ -1,9 +1,11 @@
{
"required": true,
- "package": "com.example.itemtweaks.mixin",
+ "package": "com.flapjacck.swing.mixin",
"compatibilityLevel": "JAVA_25",
"client": [
- "LivingEntitySwingMixin"
+ "LivingEntitySwingMixin",
+ "ItemInHandRendererMixin",
+ "ItemInHandRendererArmMixin"
],
"injectors": {
"defaultRequire": 1