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 2025-01-26 11:10:42 +01:00
parent f8130fb1eb
commit 69a58f1ba9
Signed by: Jenny
GPG Key ID: 4A98012FB1C39311
3 changed files with 4 additions and 5 deletions

View File

@ -38,7 +38,7 @@ mod_name=Enhanced Explosives
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=All Rights Reserved
# The mod version. See https://semver.org/
mod_version=0.8.6
mod_version=0.8.7
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View File

@ -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) {

View File

@ -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;