fixed a bug that resets the config when floats are changed (pretty sure that's forge's fault, because chaning to double works)

This commit is contained in:
Jenny committed 2025-01-26 11:10:42 +01:00
1 parent f8130fb1eb
commit 69a58f1ba9
3 files changed
+4 -5

No files matched your search

@@ -19,9 +19,9 @@ public class ConfigClient {
BUILDER.comment("weather to spawn client-side particles for tnt")
.define("tntParticles", true);
private static final ForgeConfigSpec.ConfigValue<Float> C_PARTICLE_PERCENT =
private static final ForgeConfigSpec.ConfigValue<Double> C_PARTICLE_PERCENT =
BUILDER.comment("amount of particles to spawn (0.0 = None, 1.0 = normal, values higher are valid too)")
.define("arrowParticleCount", 1.0f);
.define("arrowParticleCount", 1.0D);
public static final ForgeConfigSpec SPEC = BUILDER.build();
@@ -33,7 +33,7 @@ public class ConfigClient {
{
arrowParticles = C_ARROW_PARTICLES.get();
tntParticles = C_TNT_PARTICLES.get();
particlePercent = C_PARTICLE_PERCENT.get();
particlePercent = C_PARTICLE_PERCENT.get().floatValue();
}
public static int calcPCount(int pCount) {
@@ -10,7 +10,6 @@ import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.projectile.Arrow;
import net.minecraft.world.entity.projectile.Projectile;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;