mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fixed prismarine bad meta crashes
This commit is contained in:
parent
ee523eb5cc
commit
91907485b4
@ -46,7 +46,7 @@ class Prismarine extends Solid{
|
||||
self::DARK => "Dark Prismarine",
|
||||
self::BRICKS => "Prismarine Bricks",
|
||||
];
|
||||
return $names[$this->meta & 0x0f];
|
||||
return $names[$this->meta & 0x03] ?? "Unknown";
|
||||
}
|
||||
|
||||
public function getToolType(){
|
||||
@ -56,7 +56,7 @@ class Prismarine extends Solid{
|
||||
public function getDrops(Item $item){
|
||||
if($item->isPickaxe() >= Tool::TIER_WOODEN){
|
||||
return [
|
||||
[$this->id, $this->meta & 0x0f, 1],
|
||||
[$this->id, $this->meta & 0x03, 1],
|
||||
];
|
||||
}else{
|
||||
return [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user