mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-08 19:38:57 +01:00
Fixup sword blocking in <= 1.8
Closes https://github.com/ViaVersion/ViaFabricPlus/pull/438 Co-authored-by: Error <45919406+OfficialError@users.noreply.github.com>
This commit is contained in:
parent
aa27837c56
commit
456a5a94b9
@ -49,10 +49,12 @@ public abstract class MixinHeldItemRenderer {
|
||||
|
||||
if (VisualSettings.global().enableSwordBlocking.isEnabled() || blockHitAnimation) {
|
||||
final Arm arm = hand == Hand.MAIN_HAND ? player.getMainArm() : player.getMainArm().getOpposite();
|
||||
matrices.translate(arm == Arm.RIGHT ? -0.1F : 0.1F, 0.05F, 0.0F);
|
||||
|
||||
if (blockHitAnimation) {
|
||||
applySwingOffset(matrices, arm, swingProgress);
|
||||
matrices.translate(arm == Arm.RIGHT ? -0.14F : 0.14F, 0.12F, 0.12F);
|
||||
} else {
|
||||
matrices.translate(arm == Arm.RIGHT ? -0.15F : 0.15F, 0.07F, 0.12F);
|
||||
}
|
||||
matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(-102.25f));
|
||||
matrices.multiply((arm == Arm.RIGHT ? RotationAxis.POSITIVE_Y : RotationAxis.NEGATIVE_Y).rotationDegrees(13.365f));
|
||||
|
Loading…
Reference in New Issue
Block a user