Environmental

Environmental

8M Downloads

Leaf placement does not properly set initial state

SeanDougherty opened this issue ยท 0 comments

commented

When placing leaf blocks, the current practice is to call setForcedState().

This places the block at the given position with the 18 flag, which prevents neighbor reactions (e.g., fences connecting) [16] and sends the change to the client [2]. However, leaf placement also requires a block update upon placement in order to properly manage the leaf block's distance property, so the flag should be incremented to 19 which enables the [1] flag that causes a block update.

What will this fix accomplish?
Wisteria Trees in Environmentals mod will now generate in a valid initial state. Allowing for improved compatibility. Without this fix, mods that use DFS traversals will fail when interacting with Wisteria leaf blocks (e.g., Create Mod's sawcutter). This is because (currently) all Wisteria leaf blocks generate with a distance of 1.

special note:
Adding this fix to a 1.16.5 release will allow the youtuber, Etho, as well as individuals playing his modpack, to use Environmentals planks/logs when designing their base as it will become an easily farmable and attractive material using the Create Mod's sawcutter.

solution
This 1-liner fix has been PRed, and is mergeable at your discretion.
#278

setForcedState Flags:
image