The Bug:
Particles produced from moving in powder snow cannot be seen by other players.
Steps to Reproduce:
Summon a medium-sized area of of powder snow by using the command provided below.
/fill ~1 ~ ~1 ~5 ~ ~5 minecraft:powder_snowGet two players and label them "Player A" and "Player B".
Have "Player A" enter the powder snow and move around in it constantly.
Get "Player B" to watch "Player A" closely.
Take note as to whether or not particles produced from moving in powder snow can be seen by other players.
Observed Behavior:
Powder snow particles can only be seen by the person moving in the powder snow, and not other players.
Expected Behavior:
Powder snow particles would be seen by all players.
Code Analysis:
Code analysis by @unknown can be found below.
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
net.minecraft.world.level.block.PowderSnowBlock.java
public class PowderSnowBlock extends Block implements BucketPickup {
...
public void entityInside(BlockState $bs, Level $l, BlockPos $bp, Entity $e) {
if (!($e instanceof LivingEntity) || $e.getFeetBlockState().is(this)) {
$e.makeStuckInBlock($bs, new Vec3((double)0.9F, 1.5D, (double)0.9F));
if ($l.isClientSide) {
Random random = $l.getRandom();
boolean flag = $e.xOld != $e.getX() || $e.zOld != $e.getZ();
if (flag && random.nextBoolean()) {
$l.addParticle(ParticleTypes.SNOWFLAKE, $e.getX(), (double)($bp.getY() + 1), $e.getZ(), (double)(Mth.randomBetween(random, -1.0F, 1.0F) * 0.083333336F), (double)0.05F, (double)(Mth.randomBetween(random, -1.0F, 1.0F) * 0.083333336F));
}
}
}
...If we look at the above class, we can see that particles produced from moving in powder snow are only produced client-side. This is evident through the following line of code:
if ($l.isClientSide)Linked issues
relates to 1
Comments 0
No comments.