diff --git a/common/src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/entity/AbstractClientPlayerEntityMixin.java b/common/src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/entity/AbstractClientPlayerEntityMixin.java deleted file mode 100644 index ab1e2ec6..00000000 --- a/common/src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/entity/AbstractClientPlayerEntityMixin.java +++ /dev/null @@ -1,10 +0,0 @@ -package nl.enjarai.doabarrelroll.mixin.client.roll.entity; - -import net.minecraft.client.network.AbstractClientPlayerEntity; -import nl.enjarai.doabarrelroll.mixin.roll.entity.PlayerEntityMixin; -import org.spongepowered.asm.mixin.Mixin; - -@Mixin(AbstractClientPlayerEntity.class) -public abstract class AbstractClientPlayerEntityMixin extends PlayerEntityMixin { - // Mixin to fill out inheritance tree and support subclass mixins -} diff --git a/common/src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/entity/ClientPlayerEntityMixin.java b/common/src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/entity/ClientPlayerEntityMixin.java index 95cd13d3..c46c15f7 100644 --- a/common/src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/entity/ClientPlayerEntityMixin.java +++ b/common/src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/entity/ClientPlayerEntityMixin.java @@ -7,6 +7,7 @@ import nl.enjarai.doabarrelroll.config.Sensitivity; import nl.enjarai.doabarrelroll.flight.RotationModifiers; import nl.enjarai.doabarrelroll.math.MagicNumbers; +import nl.enjarai.doabarrelroll.mixin.roll.entity.PlayerEntityMixin; import nl.enjarai.doabarrelroll.net.register.RollSyncClient; import org.joml.Vector3d; import org.spongepowered.asm.mixin.Mixin; @@ -17,7 +18,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(ClientPlayerEntity.class) -public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntityMixin { +public abstract class ClientPlayerEntityMixin extends PlayerEntityMixin { @Shadow public float renderYaw; @Shadow public float lastRenderYaw; @@ -42,11 +43,10 @@ public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity } @Override - protected void doABarrelRoll$baseTickTail(CallbackInfo ci) { + @Unique + protected void doABarrelRoll$baseTickTail2() { // Update rolling status doABarrelRoll$setRolling(RollEvents.shouldRoll()); - - super.doABarrelRoll$baseTickTail(ci); } @Override diff --git a/common/src/main/java/nl/enjarai/doabarrelroll/mixin/roll/entity/PlayerEntityMixin.java b/common/src/main/java/nl/enjarai/doabarrelroll/mixin/roll/entity/PlayerEntityMixin.java index 6643b966..4d27a858 100644 --- a/common/src/main/java/nl/enjarai/doabarrelroll/mixin/roll/entity/PlayerEntityMixin.java +++ b/common/src/main/java/nl/enjarai/doabarrelroll/mixin/roll/entity/PlayerEntityMixin.java @@ -18,6 +18,8 @@ public abstract class PlayerEntityMixin extends LivingEntityMixin { @Override protected void doABarrelRoll$baseTickTail(CallbackInfo ci) { + doABarrelRoll$baseTickTail2(); + prevRoll = doABarrelRoll$getRoll(); if (!doABarrelRoll$isRolling()) { @@ -25,6 +27,10 @@ public abstract class PlayerEntityMixin extends LivingEntityMixin { } } + @Unique + protected void doABarrelRoll$baseTickTail2() { + } + @Override public boolean doABarrelRoll$isRolling() { return isRolling; diff --git a/common/src/main/resources/do_a_barrel_roll.mixins.json b/common/src/main/resources/do_a_barrel_roll.mixins.json index 3eb41f0e..1ce8b1eb 100644 --- a/common/src/main/resources/do_a_barrel_roll.mixins.json +++ b/common/src/main/resources/do_a_barrel_roll.mixins.json @@ -25,7 +25,6 @@ "client.roll.GameRendererMixin", "client.roll.MouseMixin", "client.roll.PlayerEntityRendererMixin", - "client.roll.entity.AbstractClientPlayerEntityMixin", "client.roll.entity.ClientPlayerEntityMixin" ], "server": [