mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
All types of coral now have fully dynamic types
This commit is contained in:
@ -26,7 +26,6 @@ namespace pocketmine\block;
|
||||
use pocketmine\block\BlockIdentifier as BID;
|
||||
use pocketmine\block\BlockLegacyIds as Ids;
|
||||
use pocketmine\block\tile\Sign as TileSign;
|
||||
use pocketmine\block\utils\CoralType;
|
||||
use pocketmine\block\utils\DyeColor;
|
||||
use pocketmine\block\utils\TreeType;
|
||||
use pocketmine\item\ItemIds;
|
||||
@ -244,17 +243,6 @@ final class BlockLegacyIdHelper{
|
||||
if($id === null){
|
||||
throw new \InvalidArgumentException("Stone slab type should be 1, 2, 3 or 4");
|
||||
}
|
||||
return new BlockIdentifierFlattened($id[0], $id[1], $meta);
|
||||
}
|
||||
|
||||
public static function getWallCoralFanIdentifier(CoralType $type) : BlockIdentifier{
|
||||
switch($type->id()){
|
||||
case CoralType::TUBE()->id(): return new BID(Ids::CORAL_FAN_HANG, 0, ItemIds::CORAL_FAN);
|
||||
case CoralType::BRAIN()->id(): return new BID(Ids::CORAL_FAN_HANG, 1, ItemIds::CORAL_FAN);
|
||||
case CoralType::BUBBLE()->id(): return new BID(Ids::CORAL_FAN_HANG2, 0, ItemIds::CORAL_FAN);
|
||||
case CoralType::FIRE()->id(): return new BID(Ids::CORAL_FAN_HANG2, 1, ItemIds::CORAL_FAN);
|
||||
case CoralType::HORN()->id(): return new BID(Ids::CORAL_FAN_HANG3, 0, ItemIds::CORAL_FAN);
|
||||
}
|
||||
throw new AssumptionFailedError("Switch should cover all coral types");
|
||||
return new BlockIdentifierFlattened($id[0], [$id[1]], $meta);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user