This commit is contained in:
GameHerobrine 2022-10-09 22:49:32 +03:00
parent 0275420a12
commit b328736591
2 changed files with 5 additions and 3 deletions

View file

@ -172,7 +172,9 @@ abstract class Block extends Position{
final public function getID(){
return $this->id;
}
public function setMetadata($i){
$this->meta = $i;
}
final public function getMetadata(){
return $this->meta & 0x0F;
}

View file

@ -53,9 +53,9 @@ class Explosion{
for($blastForce = $this->size * (mt_rand(700, 1300) / 1000); $blastForce > 0; $blastForce -= $this->stepLen * 0.75){
$vBlock = $pointer->floor();
$blockID = $this->level->level->getBlockID($vBlock->x, $vBlock->y, $vBlock->z);
$blockMeta = $this->level->level->getBlockDamage($vBlock->x, $vBlock->y, $vBlock->z);
if($blockID > 0){
$block = BlockAPI::get($blockID, 0);
$block = BlockAPI::get($blockID, $blockMeta);
$block->x = $vBlock->x;
$block->y = $vBlock->y;
$block->z = $vBlock->z;