/place feature/structure sometimes doesn't cause blocks/lights to update
The bug
Placing a structure or a feature doesn't appear to cause block updates or light updates, leaving water without a source in the world.







Code analysis
Code analysis by Hugman can be found in this comment.
Linked Issues
Created Issue:
/placefeature sometimes not update block
Summary: Placing a structure does not appear to cause block updates, leaving water without a source in the world.
/placefeature sometimesnot update block/placefeature sometimes does not cause block updates
relates to
/place feature/structure sometimes does not cause block updates
The bug
Placing a structure does not appear to cause block updates, leaving water without a source in the world.
Code analysis
Code analysis by Hugman can be found in this comment.
/place feature/structure sometimes doesnot cause block updates/place feature/structure sometimes doesn't cause blocks/lights to update
The bug
Placing a structure does
not appear to cause block updates, leaving water without a source in the world.
Code analysis
Code analysis by Hugman can be found in this comment.
The bug
Placing a structure or a feature doesn't appear to cause block updates or light updates, leaving water without a source in the world.
Code analysis
Code analysis by Hugman can be found in this comment.


Can confirm in 22w14a. MC-248199.mp4
MC-248199.png
It seems like the method used in the features that are incorrectly placed provide an incorrect argument: the flags.
With Fabric's mappings I was able to indentify that there was a "setBlockState" method within the "Feature" class that should be used for all features, but is not. They call for the more generic "setBlockState" method, in the "ModifiableWorld" class with the flags argument set to 3, which means "notify the neighbor blocks, listeners and the client when the block is placed". You can also notify only the listeners and the client by using the value 2. However, some features call for the generic "setBlockState" method with 4 as the argument, which tells the client to suppress the render pass on clients.
Feature classes that do not use the "notify listener" include:
In 1.19 Pre-3 and 1.18.2.
Can confirm in 23w03a
can confirm in 1.19.4, it's also sometimes don't update light
Request me to be the reporter of the issue, not only does the original reporter (Brain180) is inactive but also that reporter it's literally me.
Can confirm in 1.21.4