mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Fixed some air items with count 1 instead of 0
This commit is contained in:
@ -182,7 +182,7 @@ class ShapedRecipe implements CraftingRecipe{
|
|||||||
*/
|
*/
|
||||||
public function getIngredient(int $x, int $y) : Item{
|
public function getIngredient(int $x, int $y) : Item{
|
||||||
$exists = $this->ingredientList[$this->shape[$y]{$x}] ?? null;
|
$exists = $this->ingredientList[$this->shape[$y]{$x}] ?? null;
|
||||||
return $exists !== null ? clone $exists : ItemFactory::get(Item::AIR);
|
return $exists !== null ? clone $exists : ItemFactory::get(Item::AIR, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,7 +76,7 @@ class FlowerPot extends Spawnable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function removeItem(){
|
public function removeItem(){
|
||||||
$this->setItem(ItemFactory::get(Item::AIR));
|
$this->setItem(ItemFactory::get(Item::AIR, 0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isEmpty() : bool{
|
public function isEmpty() : bool{
|
||||||
|
@ -52,7 +52,7 @@ class ItemFrame extends Spawnable{
|
|||||||
if(isset($this->namedtag->Item)){
|
if(isset($this->namedtag->Item)){
|
||||||
return Item::nbtDeserialize($this->namedtag->Item);
|
return Item::nbtDeserialize($this->namedtag->Item);
|
||||||
}else{
|
}else{
|
||||||
return ItemFactory::get(Item::AIR);
|
return ItemFactory::get(Item::AIR, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user