All versions
1.20.1-1.0
Release
Dynamic Trees Particle Fixer 1.20.1-1.08 months ago 247
Compatibility
Minecraft: Java Edition
1.20.1
Platform
Forge
Supported environments
Client-side
Changes
@Inject(method = "addDustParticle", at = @At("HEAD"), cancellable = true)
private static void fixNullParticle(Level level, double fx, double fy, double fz, double mx, double my, double mz, net.minecraft.world.level.block.state.BlockState blockState, float r, float g, float b, CallbackInfo ci) {
if (level.isClientSide) {
Particle particle = net.minecraft.client.Minecraft.getInstance().particleEngine.createParticle(new net.minecraft.core.particles.BlockParticleOption(net.minecraft.core.particles.ParticleTypes.BLOCK, blockState), fx, fy, fz, mx, my, mz);
if (particle == null) {
net.minecraft.core.particles.DustParticleOptions dust = new net.minecraft.core.particles.DustParticleOptions(new Vector3f(r, g, b), 1.0F);
level.addParticle(dust, fx, fy, fz, mx, my, mz);
ci.cancel();
}
}
}
Easy mixin for fix crash
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:COH4GMFt:cJYFRGYR"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:COH4GMFt:cJYFRGYR"
}

