mojira.dev
MC-248199

/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.

[media][media][media][media][media][media][media]

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 7

Can confirm in 22w14a.

[media][media]

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:

  • ForestRockFeature

  • FossilFeature

  • HugeFungusFeature

  • BlockPileFeature

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

Brain180

Brain81505

(Unassigned)

Confirmed

Platform

Low

World generation

/place

22w03a, 1.18.2, 22w14a, 22w18a, 1.19 Pre-release 3, ..., 24w09a, 1.20.5, 1.21, 24w40a, 1.21.3

Retrieved