diff --git a/src/main/java/net/zepalesque/redux/client/renderer/ReduxRenderers.java b/src/main/java/net/zepalesque/redux/client/renderer/ReduxRenderers.java index 2bb114791..d9ebdebb1 100644 --- a/src/main/java/net/zepalesque/redux/client/renderer/ReduxRenderers.java +++ b/src/main/java/net/zepalesque/redux/client/renderer/ReduxRenderers.java @@ -29,6 +29,7 @@ public static void registerLayerDefinitions(EntityRenderersEvent.RegisterLayerDe public static void registerEntityRenderers(EntityRenderersEvent.RegisterRenderers event) { Redux.BLOCK_SETS.forEach(set -> set.registerRenderers(event)); event.registerEntityRenderer(AetherEntityTypes.WHIRLWIND.get(), ReduxWhirlwindRenderer::new); + event.registerEntityRenderer(AetherEntityTypes.EVIL_WHIRLWIND.get(), ReduxWhirlwindRenderer::new); } public static void registerAccessoryRenderers() { diff --git a/src/main/java/net/zepalesque/redux/client/renderer/entity/model/WhirlwindModel.java b/src/main/java/net/zepalesque/redux/client/renderer/entity/model/WhirlwindModel.java index 637e46983..3a7e3fb5f 100644 --- a/src/main/java/net/zepalesque/redux/client/renderer/entity/model/WhirlwindModel.java +++ b/src/main/java/net/zepalesque/redux/client/renderer/entity/model/WhirlwindModel.java @@ -14,7 +14,6 @@ import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.util.Mth; import net.zepalesque.zenith.util.EasingUtil; -import net.zepalesque.zenith.util.MathUtil; import org.jetbrains.annotations.NotNull; import java.util.Arrays; @@ -83,13 +82,13 @@ public void setupAnim(@NotNull T entity, float limbSwing, float limbSwingAmount, final int total = length + offset * 3; if (ageInTicks < total) { for (int i = 0; i < 4; i++) { - float prog = MathUtil.clampedInverp(ageInTicks - 1 - offset * i, 0, length); + float prog = Math.clamp(ageInTicks - 1 - offset * i, 0, length) / length; int a = (Math.round(255F * EasingUtil.Sinusoidal.inOut(prog)) << 24) | mask; alpha[i] = a; } } else if (entity.deathTime < total && entity.deathTime > 0) { for (int i = 0; i < 4; i++) { - float prog = 1 - MathUtil.clampedInverp(ageInTicks - 1 - offset * i, 0, length); + float prog = 1F - Math.clamp(entity.deathTime + ageInTicks % 1 - offset * i, 0, length) / length; int a = (Math.round(255F * EasingUtil.Sinusoidal.inOut(prog)) << 24) | mask; alpha[i] = a; } diff --git a/src/main/resources/assets/aether/textures/entity/whirlwind/evil_whirlwind.png b/src/main/resources/assets/aether/textures/entity/whirlwind/evil_whirlwind.png new file mode 100644 index 000000000..69b98eed1 Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/whirlwind/evil_whirlwind.png differ