Skip to content

Commit

Permalink
forgot the config conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixces committed Feb 29, 2024
1 parent 91a6d41 commit cefb31a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(FlyingItemEntityRenderer.class)
Expand All @@ -26,7 +25,7 @@ public class FlyingItemEntityRendererMixin<T extends Entity> {
)
)
public int disableCleanView(Entity instance, Operation<Integer> original) {
return 2;
return LegacyAnimationsSettings.CONFIG.instance().oldProjectiles ? 2 : original.call(instance);
}

@Inject(
Expand All @@ -37,7 +36,9 @@ public int disableCleanView(Entity instance, Operation<Integer> original) {
)
)
public void shiftProjectile(T entity, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
matrices.translate(0.25F, 0.0F, 0.0F);
if (LegacyAnimationsSettings.CONFIG.instance().oldProjectiles) {
matrices.translate(0.25F, 0.0F, 0.0F);
}
}

}

0 comments on commit cefb31a

Please sign in to comment.