Skip to content

Commit

Permalink
HELLLLLLLLLLLLLLLLLLL FUCKING YEAAAA
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed Apr 29, 2024
1 parent 0379beb commit 23ca8d9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ public abstract class PlayerEntityMixin extends LivingEntityMixin {

@Override
protected void doABarrelRoll$baseTickTail(CallbackInfo ci) {
doABarrelRoll$baseTickTail2();

prevRoll = doABarrelRoll$getRoll();

if (!doABarrelRoll$isRolling()) {
doABarrelRoll$setRoll(0.0f);
}
}

@Unique
protected void doABarrelRoll$baseTickTail2() {
}

@Override
public boolean doABarrelRoll$isRolling() {
return isRolling;
Expand Down
1 change: 0 additions & 1 deletion common/src/main/resources/do_a_barrel_roll.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"client.roll.GameRendererMixin",
"client.roll.MouseMixin",
"client.roll.PlayerEntityRendererMixin",
"client.roll.entity.AbstractClientPlayerEntityMixin",
"client.roll.entity.ClientPlayerEntityMixin"
],
"server": [
Expand Down

0 comments on commit 23ca8d9

Please sign in to comment.