Added a hack to allow tiles to trigger client-side render updates on blocks without actually changing the block

Bedrock block entity updates don't directly trigger block rendering
updates. This is a problem when the block entity data affects the
block's appearance directly (e.g. cauldron water colour, flower pot
contents), because it means changing them won't directly result in a
client-side render update.

This hack allows tiles to spoof block updates without actually changing
the server-side block, keeping the internals and API clean of random
shitbox workarounds.

fixes #5174
fixes #4944
This commit is contained in:
Dylan K. Taylor
2022-07-19 17:47:41 +01:00
parent f64e306fb8
commit 87b840ff97
4 changed files with 44 additions and 2 deletions

View File

@ -907,7 +907,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
});
$this->map(Blocks::FLOWER_POT(), function() : Writer{
return Writer::create(Ids::FLOWER_POT)
->writeBool(StateNames::UPDATE_BIT, true); //to keep MCPE happy
->writeBool(StateNames::UPDATE_BIT, false); //to keep MCPE happy
});
$this->map(Blocks::FROSTED_ICE(), function(FrostedIce $block) : Writer{
return Writer::create(Ids::FROSTED_ICE)