mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Added soul fire
This commit is contained in:
@ -1070,6 +1070,10 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
|
||||
->writeBool(StateNames::COVERED_BIT, false)
|
||||
->writeInt(StateNames::HEIGHT, $block->getLayers() - 1);
|
||||
});
|
||||
$this->map(Blocks::SOUL_FIRE(), function() : Writer{
|
||||
return Writer::create(Ids::SOUL_FIRE)
|
||||
->writeInt(StateNames::AGE, 0); //useless for soul fire, we don't track it
|
||||
});
|
||||
$this->mapSimple(Blocks::SOUL_SAND(), Ids::SOUL_SAND);
|
||||
$this->map(Blocks::SPONGE(), function(Sponge $block) : Writer{
|
||||
return Writer::create(Ids::SPONGE)
|
||||
|
@ -992,6 +992,10 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
|
||||
$in->ignored(StateNames::COVERED_BIT); //seems to be useless
|
||||
return Blocks::SNOW_LAYER()->setLayers($in->readBoundedInt(StateNames::HEIGHT, 0, 7) + 1);
|
||||
});
|
||||
$this->map(Ids::SOUL_FIRE, function(Reader $in) : Block{
|
||||
$in->ignored(StateNames::AGE); //this is useless for soul fire, since it doesn't have the logic associated
|
||||
return Blocks::SOUL_FIRE();
|
||||
});
|
||||
$this->map(Ids::SOUL_SAND, fn() => Blocks::SOUL_SAND());
|
||||
$this->map(Ids::SPONGE, function(Reader $in) : Block{
|
||||
return Blocks::SPONGE()->setWet(match($type = $in->readString(StateNames::SPONGE_TYPE)){
|
||||
|
Reference in New Issue
Block a user