Conversation
if($block->getSide(1)->getLightLevel() < 4){ | ||
Server::getInstance()->getPluginManager()->callEvent($ev = new BlockSpreadEvent($block, $this, new Dirt())); | ||
} | ||
elseif($block->getSide(1)->getLightLevel() >= 9){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the PocketMine code style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because i haven't put elseif behind the bracket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
@PEMapModder is that all correct now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wtf wtf wtf
Server::getInstance()->getPluginManager()->callEvent($ev = new BlockSpreadEvent($block, $this, new Grass())); | ||
if(!$ev->isCancelled()){ | ||
$this->getLevel()->setBlock($block, $ev->getNewState()); | ||
$block = $this->getLevel()->getBlock(new Vector3($this->x, $this->y, $this->z)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PEMapModder y u merge this
wtf wtf wtf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$block = $this; 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dan of 2015..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SOF3 no need to shout. He isn't active.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where. is. the. FACEDESK. EMOJI. NOW.
$x = mt_rand($this->x - 1, $this->x + 1); | ||
$y = mt_rand($this->y - 2, $this->y + 2); | ||
$z = mt_rand($this->z - 1, $this->z + 1); | ||
$block = $this->getLevel()->getBlock(new Vector3($x, $y, $z)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm just a simple thing: You see this line but complain about the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump THIS LINE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could understand that @PEMapModder didn't realize the getBlock leak problem since @shoghicp added it, but new Vector3($this->x, $this->y, $this->z)
was totally pointless...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shoghicp added it back in October 2014, so probably too late to blame him.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semms so. @dktapps seems to be on a fix
See #3595