Skip to content

Commit db509c6

Browse files
committed
how many fucking times am i going to polish these trails
1 parent a919cdf commit db509c6

4 files changed

Lines changed: 15 additions & 14 deletions

File tree

src/main/java/ladysnake/effective/client/Effective.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package ladysnake.effective.client;
22

3-
import com.sammy.lodestone.systems.rendering.particle.type.LodestoneParticleType;
43
import ladysnake.effective.client.particle.*;
5-
import ladysnake.effective.client.particle.types.ColoredParticleType;
64
import ladysnake.effective.client.particle.types.SplashParticleType;
75
import ladysnake.effective.client.render.entity.model.SplashBottomModel;
86
import ladysnake.effective.client.render.entity.model.SplashBottomRimModel;
@@ -58,7 +56,7 @@ public class Effective implements ClientModInitializer {
5856
public static DefaultParticleType GLOW_DROPLET;
5957
public static DefaultParticleType GLOW_RIPPLE;
6058
public static DefaultParticleType GLOW_WATERFALL_CLOUD;
61-
public static AllayTwinkParticleType ALLAY_TWINKLE;
59+
public static AllayTwinkleParticleType ALLAY_TWINKLE;
6260

6361
// sound events
6462
public static SoundEvent AMBIENCE_WATERFALL = new SoundEvent(new Identifier(MODID, "ambience.waterfall"));
@@ -96,8 +94,8 @@ public void onInitializeClient() {
9694
ParticleFactoryRegistry.getInstance().register(Effective.GLOW_RIPPLE, GlowRippleParticle.DefaultFactory::new);
9795
GLOW_WATERFALL_CLOUD = Registry.register(Registry.PARTICLE_TYPE, "effective:glow_waterfall_cloud", FabricParticleTypes.simple(true));
9896
ParticleFactoryRegistry.getInstance().register(Effective.GLOW_WATERFALL_CLOUD, GlowWaterfallCloudParticle.DefaultFactory::new);
99-
ALLAY_TWINKLE = Registry.register(Registry.PARTICLE_TYPE, "effective:allay_twinkle", new AllayTwinkParticleType());
100-
ParticleFactoryRegistry.getInstance().register(Effective.ALLAY_TWINKLE, AllayTwinkParticleType.Factory::new);
97+
ALLAY_TWINKLE = Registry.register(Registry.PARTICLE_TYPE, "effective:allay_twinkle", new AllayTwinkleParticleType());
98+
ParticleFactoryRegistry.getInstance().register(Effective.ALLAY_TWINKLE, AllayTwinkleParticleType.Factory::new);
10199

102100
// sound events
103101
AMBIENCE_WATERFALL = Registry.register(Registry.SOUND_EVENT, AMBIENCE_WATERFALL.getId(), AMBIENCE_WATERFALL);

src/main/java/ladysnake/effective/client/particle/AllayTwinkParticle.java renamed to src/main/java/ladysnake/effective/client/particle/AllayTwinkleParticle.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
import net.minecraft.client.world.ClientWorld;
88
import net.minecraft.util.math.MathHelper;
99

10-
public class AllayTwinkParticle extends FrameSetParticle {
11-
public AllayTwinkParticle(ClientWorld world, WorldParticleEffect data, FabricSpriteProviderImpl spriteSet, double x, double y, double z, double xd, double yd, double zd) {
10+
public class AllayTwinkleParticle extends FrameSetParticle {
11+
public AllayTwinkleParticle(ClientWorld world, WorldParticleEffect data, FabricSpriteProviderImpl spriteSet, double x, double y, double z, double xd, double yd, double zd) {
1212
super(world, data, spriteSet, x, y, z, xd, yd, zd);
1313
addFrames(0, 5);
14-
setMaxAge(frameSet.size()*5);
14+
setMaxAge(frameSet.size()*3);
15+
this.scale = 0.12f;
1516
}
1617
@Override
1718
public void tick() {
1819
super.tick();
19-
if (age < frameSet.size()*5) {
20-
setSprite(frameSet.get(MathHelper.floor(age/5f)));
20+
this.scale = 0.12f;
21+
if (age < frameSet.size()*3) {
22+
setSprite(frameSet.get(MathHelper.floor(age/3f)));
2123
}
2224
}
2325

src/main/java/ladysnake/effective/client/particle/AllayTwinkParticleType.java renamed to src/main/java/ladysnake/effective/client/particle/AllayTwinkleParticleType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
import javax.annotation.Nullable;
1313

14-
public class AllayTwinkParticleType extends ParticleType<WorldParticleEffect> {
15-
public AllayTwinkParticleType() {
14+
public class AllayTwinkleParticleType extends ParticleType<WorldParticleEffect> {
15+
public AllayTwinkleParticleType() {
1616
super(false, WorldParticleEffect.DESERIALIZER);
1717
}
1818

@@ -32,7 +32,7 @@ public Factory(SpriteProvider sprite) {
3232
@Nullable
3333
@Override
3434
public Particle createParticle(WorldParticleEffect data, ClientWorld world, double x, double y, double z, double mx, double my, double mz) {
35-
return new AllayTwinkParticle(world, data, (FabricSpriteProviderImpl) sprite, x, y, z, mx, my, mz);
35+
return new AllayTwinkleParticle(world, data, (FabricSpriteProviderImpl) sprite, x, y, z, mx, my, mz);
3636
}
3737
}
3838
}

src/main/java/ladysnake/effective/mixin/allays/AllayLivingEntityRendererMixin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,12 @@ public void render(T livingEntity, float entityYaw, float tickDelta, MatrixStack
8585

8686
// twinkles
8787
if ((allayEntity.getRandom().nextInt(100) + 1) <= EffectiveConfig.allayTwinkleDensity && EffectiveUtils.isGoingFast(allayEntity) && !MinecraftClient.getInstance().isPaused()) {
88+
float spreadDivider = 4f;
8889
ParticleBuilders.create(Effective.ALLAY_TWINKLE)
8990
.setColor(new Color(data.color), new Color(data.color))
9091
.setAlpha(0.9f).setScale(0.06f).setLifetime(15)
9192
.setMotion(0, 0.05f, 0)
92-
.spawn(allayEntity.world, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).x + allayEntity.getRandom().nextGaussian() / 3f, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).y - 0.2f + allayEntity.getRandom().nextGaussian() / 3f, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).z + allayEntity.getRandom().nextGaussian() / 3f);
93+
.spawn(allayEntity.world, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).x + allayEntity.getRandom().nextGaussian() / spreadDivider, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).y - 0.2f + allayEntity.getRandom().nextGaussian() / spreadDivider, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).z + allayEntity.getRandom().nextGaussian() / spreadDivider);
9394
}
9495
}
9596
}

0 commit comments

Comments
 (0)