From b3287365917227601ef760fc9e510929a72ed976 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sun, 9 Oct 2022 22:49:32 +0300 Subject: [PATCH] 95 fix --- src/material/Block.php | 4 +++- src/world/Explosion.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/material/Block.php b/src/material/Block.php index fa920dcd..1ced4e86 100755 --- a/src/material/Block.php +++ b/src/material/Block.php @@ -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; } diff --git a/src/world/Explosion.php b/src/world/Explosion.php index bc63d780..0c60c0af 100644 --- a/src/world/Explosion.php +++ b/src/world/Explosion.php @@ -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;