Merge branch 'release/3.0' into release/3.1

This commit is contained in:
Dylan K. Taylor 2018-06-23 13:04:05 +01:00
commit 7ba6e92b6c
3 changed files with 9 additions and 2 deletions

View File

@ -53,7 +53,11 @@ class EmeraldOre extends Solid{
public function getDropsForCompatibleTool(Item $item) : array{
return [
ItemFactory::get(Item::EMERALD)
ItemFactory::get(Item::EMERALD)
];
}
protected function getXpDropAmount() : int{
return mt_rand(3, 7);
}
}

View File

@ -193,7 +193,7 @@ interface ItemIds extends BlockIds{
public const LEAD = 420;
public const NAMETAG = 421, NAME_TAG = 421;
public const PRISMARINE_CRYSTALS = 422;
public const MUTTONRAW = 423, MUTTON_RAW = 423, RAW_MUTTON = 423;
public const MUTTON = 423, MUTTONRAW = 423, MUTTON_RAW = 423, RAW_MUTTON = 423;
public const COOKED_MUTTON = 424, MUTTONCOOKED = 424, MUTTON_COOKED = 424;
public const ARMOR_STAND = 425;
public const END_CRYSTAL = 426;

View File

@ -236,6 +236,9 @@ class Explosion{
if(!isset($this->affectedBlocks[$index = Level::blockHash($sideBlock->x, $sideBlock->y, $sideBlock->z)]) and !isset($updateBlocks[$index])){
$this->level->getServer()->getPluginManager()->callEvent($ev = new BlockUpdateEvent($this->level->getBlockAt($sideBlock->x, $sideBlock->y, $sideBlock->z)));
if(!$ev->isCancelled()){
foreach($this->level->getNearbyEntities(new AxisAlignedBB($sideBlock->x - 1, $sideBlock->y - 1, $sideBlock->z - 1, $sideBlock->x + 2, $sideBlock->y + 2, $sideBlock->z + 2)) as $entity){
$entity->onNearbyBlockChange();
}
$ev->getBlock()->onNearbyBlockChange();
}
$updateBlocks[$index] = true;