mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 15:36:08 +00:00
Merge branch 'next-major' into modern-world-support
This commit is contained in:
@@ -348,7 +348,7 @@ abstract class Liquid extends Transparent{
|
||||
$ev = new BlockSpreadEvent($block, $this, $new);
|
||||
$ev->call();
|
||||
if(!$ev->isCancelled()){
|
||||
if($block->getId() > 0){
|
||||
if($block->getId() !== BlockLegacyIds::AIR){
|
||||
$this->position->getWorld()->useBreakOn($block->position);
|
||||
}
|
||||
|
||||
|
@@ -775,7 +775,7 @@ abstract class Living extends Entity{
|
||||
$id = $block->getId();
|
||||
|
||||
if($transparent === null){
|
||||
if($id !== 0){
|
||||
if($id !== BlockLegacyIds::AIR){
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
|
@@ -682,7 +682,7 @@ class Item implements \JsonSerializable{
|
||||
*/
|
||||
public static function nbtDeserialize(CompoundTag $tag) : Item{
|
||||
if($tag->getTag("id") === null || $tag->getTag("Count") === null){
|
||||
return ItemFactory::getInstance()->get(0);
|
||||
return VanillaItems::AIR();
|
||||
}
|
||||
|
||||
$count = Binary::unsignByte($tag->getByte("Count"));
|
||||
|
@@ -126,7 +126,7 @@ class TypeConverter{
|
||||
|
||||
public function recipeIngredientToCoreItemStack(RecipeIngredient $ingredient) : Item{
|
||||
if($ingredient->getId() === 0){
|
||||
return ItemFactory::getInstance()->get(ItemIds::AIR, 0, 0);
|
||||
return VanillaItems::AIR();
|
||||
}
|
||||
[$id, $meta] = ItemTranslator::getInstance()->fromNetworkIdWithWildcardHandling($ingredient->getId(), $ingredient->getMeta());
|
||||
return ItemFactory::getInstance()->get($id, $meta, $ingredient->getCount());
|
||||
|
Reference in New Issue
Block a user