Refactor Block->getResistance() -> Block->getBlastResistance() and added some documentation

This commit is contained in:
Dylan K. Taylor
2017-08-20 13:25:43 +01:00
parent 216fc6fe31
commit eeedcf7332
11 changed files with 20 additions and 10 deletions

View File

@ -95,7 +95,7 @@ class Explosion{
$block = $this->level->getBlock($vBlock);
if($block->getId() !== 0){
$blastForce -= ($block->getResistance() / 5 + 0.3) * $this->stepLen;
$blastForce -= ($block->getBlastResistance() / 5 + 0.3) * $this->stepLen;
if($blastForce > 0){
if(!isset($this->affectedBlocks[$index = Level::blockHash($block->x, $block->y, $block->z)])){
$this->affectedBlocks[$index] = $block;