The Bug:
Some particles defy the ambient lighting and glow in dark... but, for some reason, not the lava ones... especially considering that lava is brighter than crying obsidian, but tears are actually glowing and lava drops do not.
Steps to Reproduce:
Summon two command blocks, one of which summons dripping lava particles and the other that summons dripping obsidian tear particles by using the command provided below.
/setblock ~3 ~ ~3 minecraft:repeating_command_block{Command:"particle minecraft:dripping_lava ~ ~3 ~ 1 1 1 1 1 force",auto:1b}
/setblock ~-3 ~ ~3 minecraft:repeating_command_block{Command:"particle minecraft:dripping_obsidian_tear ~ ~3 ~ 1 1 1 1 1 force",auto:1b}
Set the time to "midnight" and give yourself the darkness effect by using the commands provided below.
/time set midnight
/effect give @s minecraft:darkness 999 0 true
Ensure that the "Darkness Pulsing" option is set to "100%" in your accessibility settings.
Watch both types of particles closely at the darkness effects pulsates.
Take note of how the dripping obsidian tear particles glow in the dark, but the dripping lava particles do not.
Observed Behavior:
Lava particles don't glow.
Expected Behavior:
Lava particles would glow.
Code Analysis:
Code analysis by @unknown can be found in this comment.
Attachments
Comments 4
Can confirm in 1.19.2. Here are some steps on how to go about easily reproducing this issue.
Steps to Reproduce:
Summon two command blocks, one of which summons dripping lava particles and the other that summons dripping obsidian tear particles.
/setblock ~3 ~ ~3 minecraft:repeating_command_block{Command:"particle minecraft:dripping_lava ~ ~3 ~ 1 1 1 1 1 force",auto:1b}
/setblock ~-3 ~ ~3 minecraft:repeating_command_block{Command:"particle minecraft:dripping_obsidian_tear ~ ~3 ~ 1 1 1 1 1 force",auto:1b}
Set the time to "midnight" and give yourself the darkness effect.
/time set midnight
/effect give @s minecraft:darkness 999 0 true
Ensure that the "Darkness Pulsing" option is set to "100%" in your accessibility settings.
Watch both types of particles closely at the darkness effects pulsates.
Take note of how the dripping obsidian tear particles glow in the dark, but the dripping lava particles do not.
Code Analysis:
The following is based on a decompiled version of Minecraft 1.20.1 using MCP-Reborn.
net.minecraft.client.particle.DripParticle.java // Original
@OnlyIn(Dist.CLIENT)
public class DripParticle extends TextureSheetParticle {
public static TextureSheetParticle createLavaHangParticle(SimpleParticleType p_273228_, ClientLevel p_273622_, double p_273666_, double p_273570_, double p_273214_, double p_273664_, double p_273595_, double p_272690_) {
return new DripParticle.CoolingDripHangParticle(p_273622_, p_273666_, p_273570_, p_273214_, Fluids.LAVA, ParticleTypes.FALLING_LAVA);
}
public static TextureSheetParticle createLavaFallParticle(SimpleParticleType p_273238_, ClientLevel p_273752_, double p_272651_, double p_273625_, double p_273136_, double p_273204_, double p_272797_, double p_273362_) {
DripParticle dripparticle = new DripParticle.FallAndLandParticle(p_273752_, p_272651_, p_273625_, p_273136_, Fluids.LAVA, ParticleTypes.LANDING_LAVA);
dripparticle.setColor(1.0 F, 0.2857143 F, 0.083333336 F);
return dripparticle;
}
public static TextureSheetParticle createLavaLandParticle(SimpleParticleType p_273607_, ClientLevel p_272692_, double p_273544_, double p_272768_, double p_272726_, double p_273719_, double p_272833_, double p_272949_) {
DripParticle dripparticle = new DripParticle.DripLandParticle(p_272692_, p_273544_, p_272768_, p_272726_, Fluids.LAVA);
dripparticle.setColor(1.0 F, 0.2857143 F, 0.083333336 F);
return dripparticle;
}
}
As seen in this code, we see that the lava particles are missing the attribute isGlowing
. But if we take a look at the DripParticle#createObsidianTearHangParticle
we see that sets the particle's isGlowing
to true.
net.minecraft.client.particle.DripParticle.java // Original
public static TextureSheetParticle createObsidianTearHangParticle(SimpleParticleType p_273120_, ClientLevel p_272664_, double p_272879_, double p_272592_, double p_272967_, double p_272834_, double p_273440_, double p_272888_) {
DripParticle.DripHangParticle dripparticle$driphangparticle = new DripParticle.DripHangParticle(p_272664_, p_272879_, p_272592_, p_272967_, Fluids.EMPTY, ParticleTypes.FALLING_OBSIDIAN_TEAR);
dripparticle$driphangparticle.isGlowing = true;
dripparticle$driphangparticle.gravity *= 0.01 F;
dripparticle$driphangparticle.lifetime = 100;
dripparticle$driphangparticle.setColor(0.51171875 F, 0.03125 F, 0.890625 F);
return dripparticle$driphangparticle;
}
Fix:
A simple fix to this is to set isGlowing
to true on all 3 creations of the lava particle.
net.minecraft.client.particle.DripParticle.java // Updated
@OnlyIn(Dist.CLIENT)
public class DripParticle extends TextureSheetParticle {
public static TextureSheetParticle createLavaHangParticle(SimpleParticleType p_273228_, ClientLevel p_273622_, double p_273666_, double p_273570_, double p_273214_, double p_273664_, double p_273595_, double p_272690) {
DripParticle dripparticle = new DripParticle.CoolingDripHangParticle(p_273622_, p_273666_, p_273570_, p_273214_, Fluids.LAVA, ParticleTypes.FALLING_LAVA);
dripparticle.isGlowing = true;
return dripparticle;
}
public static TextureSheetParticle createLavaFallParticle(SimpleParticleType p_273238_, ClientLevel p_273752_, double p_272651_, double p_273625_, double p_273136_, double p_273204_, double p_272797_, double p_273362_) {
DripParticle dripparticle = new DripParticle.FallAndLandParticle(p_273752_, p_272651_, p_273625_, p_273136_, Fluids.LAVA, ParticleTypes.LANDING_LAVA);
dripparticle.isGlowing = true;
dripparticle.setColor(1.0 F, 0.2857143 F, 0.083333336 F);
return dripparticle;
}
public static TextureSheetParticle createLavaLandParticle(SimpleParticleType p_273607_, ClientLevel p_272692_, double p_273544_, double p_272768_, double p_272726_, double p_273719_, double p_272833_, double p_272949_) {
DripParticle dripparticle = new DripParticle.DripLandParticle(p_272692_, p_273544_, p_272768_, p_272726_, Fluids.LAVA);
dripparticle.isGlowing = true;
dripparticle.setColor(1.0 F, 0.2857143 F, 0.083333336 F);
return dripparticle;
}
}
[media]
Can confirm on 21w44a, those are dripping lava particles. Not sure if this might be considered feature request though, but taking into account that both particles come from blocks that emit light might as well be valid.
On other note, lava particles do glow.
[media]