mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user