mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-21 10:26:38 +00:00
Fixed handling for some new blocks which slipped through the frontline
This commit is contained in:
parent
9562711b84
commit
9e89f65094
@ -30,6 +30,18 @@ use pocketmine\math\Vector3;
|
|||||||
class CobblestoneWall extends Transparent{
|
class CobblestoneWall extends Transparent{
|
||||||
public const NONE_MOSSY_WALL = 0;
|
public const NONE_MOSSY_WALL = 0;
|
||||||
public const MOSSY_WALL = 1;
|
public const MOSSY_WALL = 1;
|
||||||
|
public const GRANITE_WALL = 2;
|
||||||
|
public const DIORITE_WALL = 3;
|
||||||
|
public const ANDESITE_WALL = 4;
|
||||||
|
public const SANDSTONE_WALL = 5;
|
||||||
|
public const BRICK_WALL = 6;
|
||||||
|
public const STONE_BRICK_WALL = 7;
|
||||||
|
public const MOSSY_STONE_BRICK_WALL = 8;
|
||||||
|
public const NETHER_BRICK_WALL = 9;
|
||||||
|
public const END_STONE_BRICK_WALL = 10;
|
||||||
|
public const PRISMARINE_WALL = 11;
|
||||||
|
public const RED_SANDSTONE_WALL = 12;
|
||||||
|
public const RED_NETHER_BRICK_WALL = 13;
|
||||||
|
|
||||||
protected $id = self::COBBLESTONE_WALL;
|
protected $id = self::COBBLESTONE_WALL;
|
||||||
|
|
||||||
@ -50,11 +62,23 @@ class CobblestoneWall extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getName() : string{
|
public function getName() : string{
|
||||||
if($this->meta === 0x01){
|
static $names = [
|
||||||
return "Mossy Cobblestone Wall";
|
self::NONE_MOSSY_WALL => "Cobblestone",
|
||||||
}
|
self::MOSSY_WALL => "Mossy Cobblestone",
|
||||||
|
self::GRANITE_WALL => "Granite",
|
||||||
return "Cobblestone Wall";
|
self::DIORITE_WALL => "Diorite",
|
||||||
|
self::ANDESITE_WALL => "Andesite",
|
||||||
|
self::SANDSTONE_WALL => "Sandstone",
|
||||||
|
self::BRICK_WALL => "Brick",
|
||||||
|
self::STONE_BRICK_WALL => "Stone Brick",
|
||||||
|
self::MOSSY_STONE_BRICK_WALL => "Mossy Stone Brick",
|
||||||
|
self::NETHER_BRICK_WALL => "Nether Brick",
|
||||||
|
self::END_STONE_BRICK_WALL => "End Stone Brick",
|
||||||
|
self::PRISMARINE_WALL => "Prismarine",
|
||||||
|
self::RED_SANDSTONE_WALL => "Red Sandstone",
|
||||||
|
self::RED_NETHER_BRICK_WALL => "Red Nether Brick"
|
||||||
|
];
|
||||||
|
return ($names[$this->getVariant()] ?? "Unknown") . " Wall";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function recalculateBoundingBox() : ?AxisAlignedBB{
|
protected function recalculateBoundingBox() : ?AxisAlignedBB{
|
||||||
|
@ -26,6 +26,12 @@ namespace pocketmine\block;
|
|||||||
class StoneSlab2 extends StoneSlab{
|
class StoneSlab2 extends StoneSlab{
|
||||||
public const TYPE_RED_SANDSTONE = 0;
|
public const TYPE_RED_SANDSTONE = 0;
|
||||||
public const TYPE_PURPUR = 1;
|
public const TYPE_PURPUR = 1;
|
||||||
|
public const TYPE_PRISMARINE = 2;
|
||||||
|
public const TYPE_DARK_PRISMARINE = 3;
|
||||||
|
public const TYPE_PRISMARINE_BRICKS = 4;
|
||||||
|
public const TYPE_MOSSY_COBBLESTONE = 5;
|
||||||
|
public const TYPE_SMOOTH_SANDSTONE = 6;
|
||||||
|
public const TYPE_RED_NETHER_BRICK = 7;
|
||||||
|
|
||||||
protected $id = self::STONE_SLAB2;
|
protected $id = self::STONE_SLAB2;
|
||||||
|
|
||||||
@ -36,7 +42,13 @@ class StoneSlab2 extends StoneSlab{
|
|||||||
public function getName() : string{
|
public function getName() : string{
|
||||||
static $names = [
|
static $names = [
|
||||||
self::TYPE_RED_SANDSTONE => "Red Sandstone",
|
self::TYPE_RED_SANDSTONE => "Red Sandstone",
|
||||||
self::TYPE_PURPUR => "Purpur"
|
self::TYPE_PURPUR => "Purpur",
|
||||||
|
self::TYPE_PRISMARINE => "Prismarine",
|
||||||
|
self::TYPE_DARK_PRISMARINE => "Dark Prismarine",
|
||||||
|
self::TYPE_PRISMARINE_BRICKS => "Prismarine Bricks",
|
||||||
|
self::TYPE_MOSSY_COBBLESTONE => "Mossy Cobblestone",
|
||||||
|
self::TYPE_SMOOTH_SANDSTONE => "Smooth Sandstone",
|
||||||
|
self::TYPE_RED_NETHER_BRICK => "Red Nether Brick"
|
||||||
];
|
];
|
||||||
|
|
||||||
return (($this->meta & 0x08) > 0 ? "Upper " : "") . ($names[$this->getVariant()] ?? "") . " Slab";
|
return (($this->meta & 0x08) > 0 ? "Upper " : "") . ($names[$this->getVariant()] ?? "") . " Slab";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user