Implement cauldrons (#5163)

the following things are currently not implemented:

- particle/sound effects when an entity extinguishes itself
- particle/sound effects when mixing different stuff in a cauldron
- powder snow cauldron

both of these things are contingent on #5169, but for the time being, the PR is functionally complete and I want to move on to something else without being stalled by the particle+sound problem (which I haven't yet decided how to solve).
This commit is contained in:
Dylan T
2022-07-20 16:12:58 +01:00
committed by GitHub
parent 466307a43f
commit c1acf44337
29 changed files with 1231 additions and 4 deletions

View File

@ -27,6 +27,7 @@ use PHPUnit\Framework\TestCase;
use pocketmine\block\BaseBanner;
use pocketmine\block\Bed;
use pocketmine\block\BlockFactory;
use pocketmine\block\BlockTypeIds;
use pocketmine\block\Skull;
use pocketmine\data\bedrock\block\BlockStateDeserializeException;
use pocketmine\data\bedrock\block\BlockStateSerializeException;
@ -54,6 +55,11 @@ final class BlockSerializerDeserializerTest extends TestCase{
self::fail($e->getMessage());
}
if($block->getTypeId() === BlockTypeIds::POTION_CAULDRON){
//this pretends to be a water cauldron in the blockstate, and stores its actual data in the blockentity
continue;
}
//The following are workarounds for differences in blockstate representation in Bedrock vs PM
//In these cases, some properties are not stored in the blockstate (but rather in the block entity NBT), but
//they do form part of the internal blockstate hash in PM. This leads to inconsistencies when serializing