mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Replace disallowed operators in src/block/
This commit is contained in:
@ -69,7 +69,7 @@ abstract class Crops extends Flowable{
|
||||
}
|
||||
|
||||
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
|
||||
if($this->age < 7 and $item instanceof Fertilizer){
|
||||
if($this->age < 7 && $item instanceof Fertilizer){
|
||||
$block = clone $this;
|
||||
$block->age += mt_rand(2, 5);
|
||||
if($block->age > 7){
|
||||
@ -100,7 +100,7 @@ abstract class Crops extends Flowable{
|
||||
}
|
||||
|
||||
public function onRandomTick() : void{
|
||||
if($this->age < 7 and mt_rand(0, 2) === 1){
|
||||
if($this->age < 7 && mt_rand(0, 2) === 1){
|
||||
$block = clone $this;
|
||||
++$block->age;
|
||||
$ev = new BlockGrowEvent($this, $block);
|
||||
|
Reference in New Issue
Block a user