Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Fixed commit #3595 #3724

Merged
merged 2 commits into from Mar 7, 2016
Merged

Fixed commit #3595 #3724

merged 2 commits into from Mar 7, 2016

Conversation

inxomnyaa
Copy link
Contributor

See #3595

if($block->getSide(1)->getLightLevel() < 4){
Server::getInstance()->getPluginManager()->callEvent($ev = new BlockSpreadEvent($block, $this, new Dirt()));
}
elseif($block->getSide(1)->getLightLevel() >= 9){
Copy link
Collaborator

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.

Copy link
Contributor Author

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?

Copy link
Collaborator

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?
PEMapModder added a commit that referenced this pull request Mar 7, 2016
@PEMapModder PEMapModder merged commit 9a3929d into PocketMine:master Mar 7, 2016
Copy link

@SOF3 SOF3 left a 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));
Copy link

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$block = $this; 🤦

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dan of 2015..

Copy link
Contributor Author

@inxomnyaa inxomnyaa Dec 11, 2016

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.

Copy link
Member

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));
Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump THIS LINE

Copy link

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...

Copy link

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.

Copy link
Contributor Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants