Skip to content

Commit

Permalink
fixed left handed arm sway direction
Browse files Browse the repository at this point in the history
  • Loading branch information
ImToggle committed Sep 12, 2024
1 parent 16551be commit 767d57c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package club.sk1er.patcher.mixins.features.lefthand;

import club.sk1er.patcher.config.PatcherConfig;
import net.minecraft.client.renderer.ItemRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(ItemRenderer.class)
public class ItemRendererMixin_LeftHandedness {
@ModifyConstant(method = "rotateWithPlayerRotations", constant = @Constant(floatValue = 1f, ordinal = 0))
private float leftHandRotate(float constant) {
return PatcherConfig.leftHandInFirstPerson ? -constant : constant;
}
}
1 change: 1 addition & 0 deletions src/main/resources/mixins.patcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
"features.invscale.GuiScreenMixin_InventoryScale",
"features.invscale.ScaledResolutionMixin_InventoryScale",
"features.lefthand.EntityRendererMixin_LeftHandedness",
"features.lefthand.ItemRendererMixin_LeftHandedness",
"features.lefthand.RenderFishMixin_LeftHandedness",
"features.lefthand.RenderItemMixin_LeftHandedness",
"features.network.NetHandlerPlayClientMixin_ChatDelay",
Expand Down

0 comments on commit 767d57c

Please sign in to comment.