mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Level: Remove redundant null checks for Item->getBlock()
this is typehinted to return Block, so these checks are pointless.
This commit is contained in:
parent
9395dbf9fa
commit
7fc3eeab00
@ -1748,7 +1748,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
foreach($tag as $v){
|
||||
if($v instanceof StringTag){
|
||||
$entry = ItemFactory::fromString($v->getValue());
|
||||
if($entry->getId() > 0 and $entry->getBlock() !== null and $entry->getBlock()->getId() === $target->getId()){
|
||||
if($entry->getId() > 0 and $entry->getBlock()->getId() === $target->getId()){
|
||||
$canBreak = true;
|
||||
break;
|
||||
}
|
||||
@ -1916,7 +1916,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
foreach($tag as $v){
|
||||
if($v instanceof StringTag){
|
||||
$entry = ItemFactory::fromString($v->getValue());
|
||||
if($entry->getId() > 0 and $entry->getBlock() !== null and $entry->getBlock()->getId() === $blockClicked->getId()){
|
||||
if($entry->getId() > 0 and $entry->getBlock()->getId() === $blockClicked->getId()){
|
||||
$canPlace = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user