forked from Sk1erLLC/Patcher
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed left handed arm sway direction
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...in/java/club/sk1er/patcher/mixins/features/lefthand/ItemRendererMixin_LeftHandedness.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters