mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Bring back support for all-sided logs, properly this time
This commit is contained in:
parent
c809365c39
commit
328ee40d5d
@ -94,7 +94,8 @@ class BlockFactory{
|
|||||||
|
|
||||||
foreach(WoodType::ALL as $type){
|
foreach(WoodType::ALL as $type){
|
||||||
//TODO: find a better way to deal with this split
|
//TODO: find a better way to deal with this split
|
||||||
self::registerBlock(new Wood($type >= 4 ? Block::WOOD2 : Block::WOOD, $type & 0x03, WoodType::NAMES[$type] . " Wood"));
|
self::registerBlock(new Log($type >= 4 ? Block::WOOD2 : Block::WOOD, $type & 0x03, WoodType::NAMES[$type] . " Log"));
|
||||||
|
self::registerBlock(new Wood($type >= 4 ? Block::WOOD2 : Block::WOOD, ($type & 0x03) | 0b1100, WoodType::NAMES[$type] . " Wood"));
|
||||||
self::registerBlock(new Leaves($type >= 4 ? Block::LEAVES2 : Block::LEAVES, $type & 0x03, $type, WoodType::NAMES[$type] . " Leaves"));
|
self::registerBlock(new Leaves($type >= 4 ? Block::LEAVES2 : Block::LEAVES, $type & 0x03, $type, WoodType::NAMES[$type] . " Leaves"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
30
src/pocketmine/block/Log.php
Normal file
30
src/pocketmine/block/Log.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* ____ _ _ __ __ _ __ __ ____
|
||||||
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||||
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||||
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||||
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* @author PocketMine Team
|
||||||
|
* @link http://www.pocketmine.net/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\PillarRotationTrait;
|
||||||
|
|
||||||
|
class Log extends Wood{
|
||||||
|
use PillarRotationTrait;
|
||||||
|
}
|
@ -23,11 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\PillarRotationTrait;
|
|
||||||
|
|
||||||
class Wood extends Solid{
|
class Wood extends Solid{
|
||||||
use PillarRotationTrait;
|
|
||||||
|
|
||||||
public const OAK = 0;
|
public const OAK = 0;
|
||||||
public const SPRUCE = 1;
|
public const SPRUCE = 1;
|
||||||
public const BIRCH = 2;
|
public const BIRCH = 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user