The bug
The speed field of the explosion particle introduced in 25w33a is misspelled as “speec”.
For enchantment definition usages in datapacks, only the “speec“ field will affect the speed of the particle:
{
"type": "minecraft:explode",
"block_interaction": "block",
"block_particles": [
{
"particle": {
"type": "minecraft:copper_fire_flame"
},
"weight": 1,
"speec": 0.1,
"speed": 10.0
}
],
"large_particle": {
"type": "minecraft:gust_emitter_large"
},
"radius": 3.5,
"small_particle": {
"type": "minecraft:gust_emitter_small"
},
"sound": "minecraft:entity.wind_charge.wind_burst"
}
Additionally, the actual name of the block_particles
list field does not match the block_effects
in the 25w33a changelog, but it is more reasonable.
Code analysis
Decompiled based on the official mapping:
public static final MapCodec<ExplosionParticleInfo> CODEC = RecordCodecBuilder.mapCodec(
var0 -> var0.group(
ParticleTypes.CODEC.fieldOf("particle").forGetter(ExplosionParticleInfo::particle),
Codec.FLOAT.optionalFieldOf("scaling", 1.0F).forGetter(ExplosionParticleInfo::scaling),
Codec.FLOAT.optionalFieldOf("speec", 1.0F).forGetter(ExplosionParticleInfo::speed)
).apply(var0, ExplosionParticleInfo::new)
);
Attachments
Comments 4
I created a simple data pack to reproduce this bug. Enable it (you may need to reopen the world) and run /give @s minecraft:wooden_sword[minecraft:enchantments={"test:explode":1}]
, then check the speed of the particles.
Confirmed!