From 9b8c03a6cdc1d8542db8f9d9cf450131bc166146 Mon Sep 17 00:00:00 2001 From: Floral <49110090+floral-qua-floral@users.noreply.github.com> Date: Sat, 19 Oct 2024 17:11:24 -0400 Subject: [PATCH] Actually use the booleans associated with the Sliding enums --- src/main/java/com/floralquafloral/mixin/EntityMixin.java | 3 +-- src/main/java/com/floralquafloral/mixin/GameOptionsMixin.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/floralquafloral/mixin/EntityMixin.java b/src/main/java/com/floralquafloral/mixin/EntityMixin.java index 7fb0302..03cc7cd 100644 --- a/src/main/java/com/floralquafloral/mixin/EntityMixin.java +++ b/src/main/java/com/floralquafloral/mixin/EntityMixin.java @@ -56,8 +56,7 @@ private void preventGettingSneakPose(CallbackInfoReturnable cir) { private void preventStepSounds(BlockPos pos, BlockState state, CallbackInfo ci) { if(((Entity) (Object) this) instanceof PlayerEntity player) { MarioData data = MarioDataManager.getMarioData(player); - ActionDefinition.IsSlidingOption isSliding = data.getAction().isSliding(data); - if(isSliding != NOT_SLIDING && isSliding != NOT_SLIDING_SMOOTH) + if(!data.getAction().isSliding(data).doFootsteps()) ci.cancel(); } } diff --git a/src/main/java/com/floralquafloral/mixin/GameOptionsMixin.java b/src/main/java/com/floralquafloral/mixin/GameOptionsMixin.java index 8059622..c69da2c 100644 --- a/src/main/java/com/floralquafloral/mixin/GameOptionsMixin.java +++ b/src/main/java/com/floralquafloral/mixin/GameOptionsMixin.java @@ -15,7 +15,7 @@ public abstract class GameOptionsMixin { @Inject(method = "getBobView", at = @At("HEAD"), cancellable = true) public void preventViewBobbing(CallbackInfoReturnable> cir) { MarioClientData data = MarioClientData.getInstance(); - if(data != null && data.getAction().isSliding(data) != ActionDefinition.IsSlidingOption.NOT_SLIDING) + if(data != null && !data.getAction().isSliding(data).doViewBobbing()) cir.setReturnValue(MarioQuaMarioClient.ALWAYS_FALSE); } }