Flatten double slabs into Slab pseudo-variant

This commit is contained in:
Dylan K. Taylor
2019-02-19 11:14:06 +00:00
parent 18f765338c
commit f351a86653
4 changed files with 116 additions and 102 deletions

View File

@ -26,6 +26,7 @@ namespace pocketmine\block;
use pocketmine\block\utils\DyeColor;
use pocketmine\block\utils\InvalidBlockStateException;
use pocketmine\block\utils\PillarRotationTrait;
use pocketmine\block\utils\SlabType;
use pocketmine\block\utils\TreeType;
use pocketmine\item\Item;
use pocketmine\level\Position;
@ -374,7 +375,7 @@ class BlockFactory{
}
foreach($slabTypes as $type){
self::registerBlock($type);
self::registerBlock(new DoubleSlab($type->getDoubleSlabId(), $type->getId(), $type->getVariant()));
self::registerBlock((clone $type)->setSlabType(SlabType::double())); //flattening hack
}
static $wallTypes = [