mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-28 06:09:57 +00:00
Fixed some weak comparisons
This commit is contained in:
parent
6ea0eb47ec
commit
b7b7bcee4f
@ -2043,7 +2043,7 @@ class Server{
|
||||
}
|
||||
|
||||
|
||||
if($this->getProperty("network.upnp-forwarding", false) == true){
|
||||
if($this->getProperty("network.upnp-forwarding", false)){
|
||||
$this->logger->info("[UPnP] Trying to port forward...");
|
||||
UPnP::PortForward($this->getPort());
|
||||
}
|
||||
@ -2140,7 +2140,7 @@ class Server{
|
||||
if($p instanceof Plugin and !($p->getPluginLoader() instanceof PharPluginLoader)){
|
||||
$report = false;
|
||||
}
|
||||
}elseif(\Phar::running(true) == ""){
|
||||
}elseif(\Phar::running(true) === ""){
|
||||
$report = false;
|
||||
}
|
||||
if($dump->getData()["error"]["type"] === "E_PARSE" or $dump->getData()["error"]["type"] === "E_COMPILE_ERROR"){
|
||||
|
@ -84,7 +84,7 @@ class Cactus extends Transparent{
|
||||
}
|
||||
}elseif($type === Level::BLOCK_UPDATE_RANDOM){
|
||||
if($this->getSide(0)->getId() !== self::CACTUS){
|
||||
if($this->meta == 0x0F){
|
||||
if($this->meta === 0x0f){
|
||||
for($y = 1; $y < 3; ++$y){
|
||||
$b = $this->getLevel()->getBlock(new Vector3($this->x, $this->y + $y, $this->z));
|
||||
if($b->getId() === self::AIR){
|
||||
|
@ -74,7 +74,7 @@ abstract class Crops extends Flowable{
|
||||
return Level::BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
}elseif($type === Level::BLOCK_UPDATE_RANDOM){
|
||||
if(mt_rand(0, 2) == 1){
|
||||
if(mt_rand(0, 2) === 1){
|
||||
if($this->meta < 0x07){
|
||||
$block = clone $this;
|
||||
++$block->meta;
|
||||
|
@ -46,7 +46,7 @@ class MelonStem extends Crops{
|
||||
return Level::BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
}elseif($type === Level::BLOCK_UPDATE_RANDOM){
|
||||
if(mt_rand(0, 2) == 1){
|
||||
if(mt_rand(0, 2) === 1){
|
||||
if($this->meta < 0x07){
|
||||
$block = clone $this;
|
||||
++$block->meta;
|
||||
|
@ -46,7 +46,7 @@ class PumpkinStem extends Crops{
|
||||
return Level::BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
}elseif($type === Level::BLOCK_UPDATE_RANDOM){
|
||||
if(mt_rand(0, 2) == 1){
|
||||
if(mt_rand(0, 2) === 1){
|
||||
if($this->meta < 0x07){
|
||||
$block = clone $this;
|
||||
++$block->meta;
|
||||
|
@ -763,8 +763,8 @@ abstract class Entity extends Location implements Metadatable{
|
||||
$this->namedtag->FallDistance = new FloatTag("FallDistance", $this->fallDistance);
|
||||
$this->namedtag->Fire = new ShortTag("Fire", $this->fireTicks);
|
||||
$this->namedtag->Air = new ShortTag("Air", $this->getDataProperty(self::DATA_AIR));
|
||||
$this->namedtag->OnGround = new ByteTag("OnGround", $this->onGround == true ? 1 : 0);
|
||||
$this->namedtag->Invulnerable = new ByteTag("Invulnerable", $this->invulnerable == true ? 1 : 0);
|
||||
$this->namedtag->OnGround = new ByteTag("OnGround", $this->onGround ? 1 : 0);
|
||||
$this->namedtag->Invulnerable = new ByteTag("Invulnerable", $this->invulnerable ? 1 : 0);
|
||||
|
||||
if(count($this->effects) > 0){
|
||||
$effects = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user