mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 01:16:15 +00:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user