mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +00:00
Merge branch 'master' of github.com:PocketMine/PocketMine-MP
This commit is contained in:
commit
2ec0d86126
@ -72,7 +72,7 @@ class Explosion{
|
|||||||
|
|
||||||
for($blastForce = $this->size * (mt_rand(700, 1300) / 1000); $blastForce > 0; $blastForce -= $this->stepLen * 0.75){
|
for($blastForce = $this->size * (mt_rand(700, 1300) / 1000); $blastForce > 0; $blastForce -= $this->stepLen * 0.75){
|
||||||
$vBlock = $pointer->floor();
|
$vBlock = $pointer->floor();
|
||||||
$blockID = $this->level->level->getBlockID($vBlock->x, $vBlock->y, $vBlock->z);
|
$blockID = $this->level->getBlockIdAt($vBlock->x, $vBlock->y, $vBlock->z);
|
||||||
|
|
||||||
if($blockID > 0){
|
if($blockID > 0){
|
||||||
$block = Block::get($blockID, 0);
|
$block = Block::get($blockID, 0);
|
||||||
@ -138,7 +138,7 @@ class Explosion{
|
|||||||
//$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), Item::get($block->getID(), $this->level->level->getBlockDamage($block->x, $block->y, $block->z)));
|
//$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), Item::get($block->getID(), $this->level->level->getBlockDamage($block->x, $block->y, $block->z)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->level->level->setBlockID($block->x, $block->y, $block->z, 0);
|
$this->level->setBlockIdAt($block->x, $block->y, $block->z, 0);
|
||||||
$send[] = new Vector3($block->x - $source->x, $block->y - $source->y, $block->z - $source->z);
|
$send[] = new Vector3($block->x - $source->x, $block->y - $source->y, $block->z - $source->z);
|
||||||
}
|
}
|
||||||
$pk = new ExplodePacket;
|
$pk = new ExplodePacket;
|
||||||
|
@ -21,15 +21,15 @@
|
|||||||
|
|
||||||
namespace pocketmine\metadata;
|
namespace pocketmine\metadata;
|
||||||
|
|
||||||
use pocketmine\OfflinePlayer;
|
use pocketmine\IPlayer;
|
||||||
|
|
||||||
class PlayerMetadataStore extends MetadataStore{
|
class PlayerMetadataStore extends MetadataStore{
|
||||||
|
|
||||||
public function disambiguate(Metadatable $player, $metadataKey){
|
public function disambiguate(Metadatable $player, $metadataKey){
|
||||||
if(!($player instanceof OfflinePlayer)){
|
if(!($player instanceof IPlayer)){
|
||||||
throw new \InvalidArgumentException("Argument must be an OfflinePlayer instance");
|
throw new \InvalidArgumentException("Argument must be an IPlayer instance");
|
||||||
}
|
}
|
||||||
|
|
||||||
return strtolower($player->getName()) . ":" . $metadataKey;
|
return strtolower($player->getName()) . ":" . $metadataKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user