mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-05 19:37:17 +00:00
strip extra blank lines (php-cs-fixer)
This commit is contained in:
parent
9cd6b3e1c7
commit
f624871b3f
@ -432,7 +432,6 @@ class MemoryManager{
|
||||
fwrite($obData, "$hash@$className: " . json_encode($info, JSON_UNESCAPED_SLASHES) . "\n");
|
||||
}
|
||||
|
||||
|
||||
}while($continue);
|
||||
|
||||
$logger->info("[Dump] Wrote " . count($objects) . " objects");
|
||||
|
@ -202,7 +202,6 @@ use const M_PI;
|
||||
use const M_SQRT3;
|
||||
use const PHP_INT_MAX;
|
||||
|
||||
|
||||
/**
|
||||
* Main class that handles networking, recovery, and packet sending to the server part
|
||||
*/
|
||||
@ -227,7 +226,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
return $lname !== "rcon" and $lname !== "console" and $len >= 1 and $len <= 16 and preg_match("/[^A-Za-z0-9_ ]/", $name) === 0;
|
||||
}
|
||||
|
||||
|
||||
/** @var SourceInterface */
|
||||
protected $interface;
|
||||
|
||||
@ -254,7 +252,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
*/
|
||||
protected $lastPingMeasure = 1;
|
||||
|
||||
|
||||
/** @var float */
|
||||
public $creationTime = 0;
|
||||
|
||||
@ -1128,7 +1125,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
}
|
||||
unset($unloadChunks[$index]);
|
||||
|
||||
|
||||
/* Bottom left quadrant */
|
||||
if(!isset($this->usedChunks[$index = Level::chunkHash($centerX - $x - 1, $centerZ - $z - 1)]) or $this->usedChunks[$index] === false){
|
||||
$newOrder[$index] = true;
|
||||
|
@ -1398,7 +1398,6 @@ class Server{
|
||||
|
||||
$this->doTitleTick = ((bool) $this->getProperty("console.title-tick", true)) && Terminal::hasFormattingCodes();
|
||||
|
||||
|
||||
$consoleSender = new ConsoleCommandSender();
|
||||
PermissionManager::getInstance()->subscribeToPermission(Server::BROADCAST_CHANNEL_ADMINISTRATIVE, $consoleSender);
|
||||
|
||||
@ -1478,14 +1477,12 @@ class Server{
|
||||
$this->network = new Network($this);
|
||||
$this->network->setName($this->getMotd());
|
||||
|
||||
|
||||
$this->logger->info($this->getLanguage()->translateString("pocketmine.server.info", [
|
||||
$this->getName(),
|
||||
(\pocketmine\IS_DEVELOPMENT_BUILD ? TextFormat::YELLOW : "") . $this->getPocketMineVersion() . TextFormat::RESET
|
||||
]));
|
||||
$this->logger->info($this->getLanguage()->translateString("pocketmine.server.license", [$this->getName()]));
|
||||
|
||||
|
||||
Timings::init();
|
||||
TimingsHandler::setEnabled((bool) $this->getProperty("settings.enable-profiling", false));
|
||||
|
||||
@ -1757,7 +1754,6 @@ class Server{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
@ -1806,7 +1802,6 @@ class Server{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$sender->sendMessage($this->getLanguage()->translateString(TextFormat::RED . "%commands.generic.notFound"));
|
||||
|
||||
return false;
|
||||
@ -1963,7 +1958,6 @@ class Server{
|
||||
$this->sendUsage(SendUsageTask::TYPE_OPEN);
|
||||
}
|
||||
|
||||
|
||||
if($this->getProperty("network.upnp-forwarding", false)){
|
||||
$this->logger->info("[UPnP] Trying to port forward...");
|
||||
try{
|
||||
@ -2294,7 +2288,6 @@ class Server{
|
||||
$this->uniquePlayers = [];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return BaseLang
|
||||
*/
|
||||
@ -2359,7 +2352,6 @@ class Server{
|
||||
//TODO: add raw packet events
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Tries to execute a server tick
|
||||
*/
|
||||
|
@ -30,7 +30,6 @@ if(defined('pocketmine\_VERSION_INFO_INCLUDED')){
|
||||
}
|
||||
const _VERSION_INFO_INCLUDED = true;
|
||||
|
||||
|
||||
const NAME = "PocketMine-MP";
|
||||
const BASE_VERSION = "3.11.5";
|
||||
const IS_DEVELOPMENT_BUILD = true;
|
||||
|
@ -26,7 +26,6 @@ namespace pocketmine\block;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
|
||||
|
||||
/**
|
||||
* Air block
|
||||
*/
|
||||
|
@ -67,7 +67,6 @@ class Block extends Position implements BlockIds, Metadatable{
|
||||
/** @var AxisAlignedBB|null */
|
||||
protected $boundingBox = null;
|
||||
|
||||
|
||||
/** @var AxisAlignedBB[]|null */
|
||||
protected $collisionBoxes = null;
|
||||
|
||||
|
@ -41,7 +41,6 @@ abstract class Crops extends Flowable{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public function onActivate(Item $item, Player $player = null) : bool{
|
||||
if($this->meta < 7 and $item->getId() === Item::DYE and $item->getDamage() === 0x0F){ //Bonemeal
|
||||
$block = clone $this;
|
||||
|
@ -39,7 +39,6 @@ class Dandelion extends Flowable{
|
||||
return "Dandelion";
|
||||
}
|
||||
|
||||
|
||||
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
|
||||
$down = $this->getSide(Vector3::SIDE_DOWN);
|
||||
if($down->getId() === Block::GRASS or $down->getId() === Block::DIRT or $down->getId() === Block::FARMLAND){
|
||||
|
@ -29,7 +29,6 @@ use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\Player;
|
||||
|
||||
|
||||
abstract class Door extends Transparent{
|
||||
|
||||
public function isSolid() : bool{
|
||||
|
@ -48,7 +48,6 @@ class Farmland extends Transparent{
|
||||
return BlockToolType::TYPE_SHOVEL;
|
||||
}
|
||||
|
||||
|
||||
protected function recalculateBoundingBox() : ?AxisAlignedBB{
|
||||
return new AxisAlignedBB(
|
||||
$this->x,
|
||||
|
@ -39,7 +39,6 @@ class FenceGate extends Transparent{
|
||||
return BlockToolType::TYPE_AXE;
|
||||
}
|
||||
|
||||
|
||||
protected function recalculateBoundingBox() : ?AxisAlignedBB{
|
||||
|
||||
if(($this->getDamage() & 0x04) > 0){
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
|
||||
class Furnace extends BurningFurnace{
|
||||
|
||||
protected $id = self::FURNACE;
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
|
||||
use pocketmine\item\TieredTool;
|
||||
|
||||
class GlowingObsidian extends Solid{
|
||||
|
@ -90,7 +90,6 @@ class Ladder extends Transparent{
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
|
||||
if(!$blockClicked->isTransparent()){
|
||||
$faces = [
|
||||
|
@ -68,7 +68,6 @@ class Leaves extends Transparent{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
protected function findLog(Block $pos, array &$visited, int $distance, ?int $fromSide = null) : bool{
|
||||
$index = $pos->x . "." . $pos->y . "." . $pos->z;
|
||||
if(isset($visited[$index])){
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
|
||||
class MossyCobblestone extends Cobblestone{
|
||||
|
||||
protected $id = self::MOSSY_COBBLESTONE;
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
|
||||
use pocketmine\event\block\BlockGrowEvent;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemFactory;
|
||||
|
@ -57,7 +57,6 @@ class SignPost extends Transparent{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
|
||||
if($face !== Vector3::SIDE_DOWN){
|
||||
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
|
||||
class Sponge extends Solid{
|
||||
|
||||
protected $id = self::SPONGE;
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
|
||||
abstract class Transparent extends Block{
|
||||
|
||||
public function isTransparent() : bool{
|
||||
|
@ -55,7 +55,6 @@ class WaterLily extends Flowable{
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
|
||||
if($blockClicked instanceof Water){
|
||||
$up = $blockClicked->getSide(Vector3::SIDE_UP);
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
|
||||
class Wood2 extends Wood{
|
||||
|
||||
public const ACACIA = 0;
|
||||
|
@ -101,7 +101,6 @@ abstract class Command{
|
||||
return $this->permission;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\command;
|
||||
|
||||
|
||||
interface CommandExecutor{
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\command;
|
||||
|
||||
|
||||
interface CommandMap{
|
||||
|
||||
/**
|
||||
@ -47,5 +46,4 @@ interface CommandMap{
|
||||
*/
|
||||
public function getCommand(string $name);
|
||||
|
||||
|
||||
}
|
||||
|
@ -135,7 +135,6 @@ class SimpleCommandMap implements CommandMap{
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public function registerAll(string $fallbackPrefix, array $commands){
|
||||
foreach($commands as $command){
|
||||
$this->register($fallbackPrefix, $command);
|
||||
@ -274,7 +273,6 @@ class SimpleCommandMap implements CommandMap{
|
||||
return $this->knownCommands;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
@ -296,7 +294,6 @@ class SimpleCommandMap implements CommandMap{
|
||||
$commandName = "";
|
||||
$command = $this->matchCommand($commandName, $args);
|
||||
|
||||
|
||||
if($command === null){
|
||||
$bad[] = $commandString;
|
||||
}elseif($commandName === $alias){
|
||||
|
@ -124,7 +124,6 @@ class EffectCommand extends VanillaCommand{
|
||||
self::broadcastCommandMessage($sender, new TranslationContainer("%commands.effect.success", [$effect->getName(), $instance->getAmplifier(), $player->getDisplayName(), $instance->getDuration() / 20, $effect->getId()]));
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,6 @@ class EnchantCommand extends VanillaCommand{
|
||||
$item->addEnchantment(new EnchantmentInstance($enchantment, $level));
|
||||
$player->getInventory()->setItemInHand($item);
|
||||
|
||||
|
||||
self::broadcastCommandMessage($sender, new TranslationContainer("%commands.enchant.success", [$player->getName()]));
|
||||
return true;
|
||||
}
|
||||
|
@ -68,7 +68,6 @@ class KickCommand extends VanillaCommand{
|
||||
$sender->sendMessage(new TranslationContainer(TextFormat::RED . "%commands.generic.player.notFound"));
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +119,6 @@ class ParticleCommand extends VanillaCommand{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$sender->sendMessage(new TranslationContainer("commands.particle.success", [$name, $count]));
|
||||
|
||||
$random = new Random((int) (microtime(true) * 1000) + mt_rand());
|
||||
|
@ -85,7 +85,6 @@ class TimeCommand extends VanillaCommand{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if(count($args) < 2){
|
||||
throw new InvalidCommandSyntaxException();
|
||||
}
|
||||
|
@ -21,10 +21,8 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace pocketmine\command\defaults;
|
||||
|
||||
|
||||
use pocketmine\command\CommandSender;
|
||||
use pocketmine\command\utils\InvalidCommandSyntaxException;
|
||||
use pocketmine\Player;
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity;
|
||||
|
||||
|
||||
interface Ageable{
|
||||
public function isBaby() : bool;
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity;
|
||||
|
||||
|
||||
abstract class Animal extends Creature implements Ageable{
|
||||
|
||||
public function isBaby() : bool{
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity;
|
||||
|
||||
|
||||
abstract class Creature extends Living{
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity;
|
||||
|
||||
|
||||
interface Damageable{
|
||||
|
||||
}
|
||||
|
@ -465,7 +465,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
/** @var Vector3 */
|
||||
public $temporalVector;
|
||||
|
||||
|
||||
/** @var float */
|
||||
public $lastYaw;
|
||||
/** @var float */
|
||||
@ -1353,7 +1352,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$this->timings->startTiming();
|
||||
|
||||
if($this->hasMovementUpdate()){
|
||||
@ -1382,7 +1380,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
$hasUpdate = $this->entityBaseTick($tickDiff);
|
||||
Timings::$timerEntityBaseTick->stopTiming();
|
||||
|
||||
|
||||
$this->timings->stopTiming();
|
||||
|
||||
//if($this->isStatic())
|
||||
@ -1511,7 +1508,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
$this->isCollided = $this->onGround;
|
||||
$this->updateFallState($dy, $this->onGround);
|
||||
|
||||
|
||||
Timings::$entityMoveTimer->stopTiming();
|
||||
|
||||
return true;
|
||||
@ -1596,7 +1592,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
|
||||
$this->boundingBox->offset(0, 0, $dz);
|
||||
|
||||
|
||||
if($this->stepHeight > 0 and $fallingFlag and $this->ySize < 0.05 and ($movX != $dx or $movZ != $dz)){
|
||||
$cx = $dx;
|
||||
$cy = $dy;
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity;
|
||||
|
||||
|
||||
interface Explosive{
|
||||
|
||||
/**
|
||||
|
@ -187,7 +187,6 @@ abstract class Living extends Entity implements Damageable{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function hasLineOfSight(Entity $entity) : bool{
|
||||
//TODO: head height
|
||||
return true;
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity;
|
||||
|
||||
|
||||
abstract class Monster extends Creature{
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity;
|
||||
|
||||
|
||||
interface NPC{
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity;
|
||||
|
||||
|
||||
interface Rideable{
|
||||
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ class Squid extends WaterAnimal{
|
||||
return new Vector3(mt_rand(-1000, 1000) / 1000, mt_rand(-500, 500) / 1000, mt_rand(-1000, 1000) / 1000);
|
||||
}
|
||||
|
||||
|
||||
public function entityBaseTick(int $tickDiff = 1) : bool{
|
||||
if($this->closed){
|
||||
return false;
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity;
|
||||
|
||||
|
||||
abstract class Vehicle extends Entity implements Rideable{
|
||||
|
||||
}
|
||||
|
@ -67,7 +67,6 @@ class ItemEntity extends Entity{
|
||||
$this->owner = $this->namedtag->getString("Owner", $this->owner);
|
||||
$this->thrower = $this->namedtag->getString("Thrower", $this->thrower);
|
||||
|
||||
|
||||
$itemTag = $this->namedtag->getCompoundTag("Item");
|
||||
if($itemTag === null){
|
||||
throw new \UnexpectedValueException("Invalid " . get_class($this) . " entity: expected \"Item\" NBT tag not found");
|
||||
@ -78,7 +77,6 @@ class ItemEntity extends Entity{
|
||||
throw new \UnexpectedValueException("Item for " . get_class($this) . " is invalid");
|
||||
}
|
||||
|
||||
|
||||
(new ItemSpawnEvent($this))->call();
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,6 @@ class PaintingMotive{
|
||||
/** @var int */
|
||||
protected $height;
|
||||
|
||||
|
||||
public function __construct(int $width, int $height, string $name){
|
||||
$this->name = $name;
|
||||
$this->width = $width;
|
||||
|
@ -48,7 +48,6 @@ class PrimedTNT extends Entity implements Explosive{
|
||||
|
||||
public $canCollide = false;
|
||||
|
||||
|
||||
public function attack(EntityDamageEvent $source) : void{
|
||||
if($source->getCause() === EntityDamageEvent::CAUSE_VOID){
|
||||
parent::attack($source);
|
||||
@ -70,7 +69,6 @@ class PrimedTNT extends Entity implements Explosive{
|
||||
$this->level->broadcastLevelEvent($this, LevelEventPacket::EVENT_SOUND_IGNITE);
|
||||
}
|
||||
|
||||
|
||||
public function canCollideWith(Entity $entity) : bool{
|
||||
return false;
|
||||
}
|
||||
|
@ -265,7 +265,6 @@ abstract class Projectile extends Entity{
|
||||
$this->checkChunks();
|
||||
$this->checkBlockCollision();
|
||||
|
||||
|
||||
Timings::$entityMoveTimer->stopTiming();
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\entity\projectile;
|
||||
|
||||
|
||||
interface ProjectileSource{
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\event;
|
||||
|
||||
|
||||
/**
|
||||
* Events that can be cancelled must use the interface Cancellable
|
||||
*/
|
||||
|
@ -91,7 +91,6 @@ class HandlerList{
|
||||
return self::$allLists;
|
||||
}
|
||||
|
||||
|
||||
/** @var string */
|
||||
private $class;
|
||||
/** @var RegisteredListener[][] */
|
||||
|
@ -84,7 +84,6 @@ class BlockBreakEvent extends BlockEvent implements Cancellable{
|
||||
$this->instaBreak = $instaBreak;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Item[]
|
||||
*/
|
||||
|
@ -73,7 +73,6 @@ class EntityDamageEvent extends EntityEvent implements Cancellable{
|
||||
/** @var int */
|
||||
private $attackCooldown = 10;
|
||||
|
||||
|
||||
/**
|
||||
* @param float[] $modifiers
|
||||
*/
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace pocketmine\event\level;
|
||||
|
||||
use pocketmine\level\format\Chunk;
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace pocketmine\event\level;
|
||||
|
||||
use pocketmine\level\format\Chunk;
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace pocketmine\event\player\cheat;
|
||||
|
||||
use pocketmine\event\Cancellable;
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace pocketmine\event\plugin;
|
||||
|
||||
class PluginDisableEvent extends PluginEvent{
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace pocketmine\event\plugin;
|
||||
|
||||
class PluginEnableEvent extends PluginEvent{
|
||||
|
@ -25,7 +25,6 @@ namespace pocketmine\event\server;
|
||||
|
||||
use pocketmine\utils\Utils;
|
||||
|
||||
|
||||
/**
|
||||
* Called when the server is in a low-memory state as defined by the properties
|
||||
* Plugins should free caches or other non-essential data.
|
||||
|
@ -421,7 +421,6 @@ abstract class BaseInventory implements Inventory{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Player|Player[] $target
|
||||
*/
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class Apple extends Food{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::APPLE, $meta, "Apple");
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\event\entity\EntityDamageEvent;
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class BeetrootSoup extends Food{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::BEETROOT_SOUP, $meta, "Beetroot Soup");
|
||||
|
@ -65,7 +65,6 @@ class Bow extends Tool{
|
||||
$p = $diff / 20;
|
||||
$baseForce = min((($p ** 2) + $p * 2) / 3, 1);
|
||||
|
||||
|
||||
$entity = Entity::createEntity("Arrow", $player->getLevel(), $nbt, $player, $baseForce >= 1);
|
||||
if($entity instanceof Projectile){
|
||||
$infinity = $this->hasEnchantment(Enchantment::INFINITY);
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class Bowl extends Item{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::BOWL, $meta, "Bowl");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class ChainBoots extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::CHAIN_BOOTS, $meta, "Chainmail Boots");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class ChainChestplate extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::CHAIN_CHESTPLATE, $meta, "Chain Chestplate");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class ChainHelmet extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::CHAIN_HELMET, $meta, "Chainmail Helmet");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class ChainLeggings extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::CHAIN_LEGGINGS, $meta, "Chain Leggings");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class Coal extends Item{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::COAL, $meta, "Coal");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class DiamondBoots extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::DIAMOND_BOOTS, $meta, "Diamond Boots");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class DiamondChestplate extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::DIAMOND_CHESTPLATE, $meta, "Diamond Chestplate");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class DiamondHelmet extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::DIAMOND_HELMET, $meta, "Diamond Helmet");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class DiamondLeggings extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::DIAMOND_LEGGINGS, $meta, "Diamond Leggings");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class GoldBoots extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::GOLD_BOOTS, $meta, "Gold Boots");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class GoldChestplate extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::GOLD_CHESTPLATE, $meta, "Gold Chestplate");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class GoldHelmet extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::GOLD_HELMET, $meta, "Gold Helmet");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class GoldLeggings extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::GOLD_LEGGINGS, $meta, "Gold Leggings");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class IronBoots extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::IRON_BOOTS, $meta, "Iron Boots");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class IronChestplate extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::IRON_CHESTPLATE, $meta, "Iron Chestplate");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class IronHelmet extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::IRON_HELMET, $meta, "Iron Helmet");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class IronLeggings extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::IRON_LEGGINGS, $meta, "Iron Leggings");
|
||||
|
@ -60,7 +60,6 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
public const TAG_DISPLAY_NAME = "Name";
|
||||
public const TAG_DISPLAY_LORE = "Lore";
|
||||
|
||||
|
||||
/** @var LittleEndianNBTStream */
|
||||
private static $cachedParser = null;
|
||||
|
||||
@ -111,7 +110,6 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
return ItemFactory::fromString($str, $multiple);
|
||||
}
|
||||
|
||||
|
||||
/** @var Item[] */
|
||||
private static $creative = [];
|
||||
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class LeatherBoots extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::LEATHER_BOOTS, $meta, "Leather Boots");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class LeatherCap extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::LEATHER_CAP, $meta, "Leather Cap");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class LeatherPants extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::LEATHER_PANTS, $meta, "Leather Pants");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class LeatherTunic extends Armor{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::LEATHER_TUNIC, $meta, "Leather Tunic");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
|
||||
class Stick extends Item{
|
||||
public function __construct(int $meta = 0){
|
||||
parent::__construct(self::STICK, $meta, "Stick");
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item\enchantment;
|
||||
|
||||
|
||||
class EnchantmentEntry{
|
||||
|
||||
/** @var Enchantment[] */
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item\enchantment;
|
||||
|
||||
|
||||
class EnchantmentList{
|
||||
|
||||
/** @var \SplFixedArray|EnchantmentEntry[] */
|
||||
|
@ -202,7 +202,6 @@ class Explosion{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$air = ItemFactory::get(Item::AIR);
|
||||
|
||||
foreach($this->affectedBlocks as $block){
|
||||
|
@ -1104,7 +1104,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
$entity->scheduleUpdate();
|
||||
}
|
||||
|
||||
|
||||
foreach($chunk->getSubChunks() as $Y => $subChunk){
|
||||
if(!($subChunk instanceof EmptySubChunk)){
|
||||
$k = mt_rand(0, 0xfffffffff); //36 bits
|
||||
@ -1247,7 +1246,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $collides;
|
||||
}
|
||||
|
||||
@ -1900,7 +1898,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($player !== null){
|
||||
$ev = new BlockPlaceEvent($player, $hand, $blockReplace, $blockClicked, $item);
|
||||
if($this->checkSpawnProtection($player, $blockClicked)){
|
||||
@ -2054,7 +2051,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
return $currentTarget;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list of the Tile entities in this level
|
||||
*
|
||||
|
@ -43,13 +43,10 @@ abstract class Biome{
|
||||
|
||||
public const ICE_PLAINS = 12;
|
||||
|
||||
|
||||
public const SMALL_MOUNTAINS = 20;
|
||||
|
||||
|
||||
public const BIRCH_FOREST = 27;
|
||||
|
||||
|
||||
public const MAX_BIOMES = 256;
|
||||
|
||||
/** @var Biome[]|\SplFixedArray */
|
||||
@ -101,7 +98,6 @@ abstract class Biome{
|
||||
|
||||
self::register(self::ICE_PLAINS, new IcePlainsBiome());
|
||||
|
||||
|
||||
self::register(self::SMALL_MOUNTAINS, new SmallMountainsBiome());
|
||||
|
||||
self::register(self::BIRCH_FOREST, new ForestBiome(ForestBiome::TYPE_BIRCH));
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\level\biome;
|
||||
|
||||
|
||||
class DesertBiome extends SandyBiome{
|
||||
|
||||
public function __construct(){
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\level\biome;
|
||||
|
||||
|
||||
class SmallMountainsBiome extends MountainsBiome{
|
||||
|
||||
public function __construct(){
|
||||
|
@ -252,7 +252,6 @@ class LevelDB extends BaseLevelProvider{
|
||||
$buffer = $nbt->write($levelData);
|
||||
file_put_contents($path . "level.dat", Binary::writeLInt(self::CURRENT_STORAGE_VERSION) . Binary::writeLInt(strlen($buffer)) . $buffer);
|
||||
|
||||
|
||||
$db = self::createDB($path);
|
||||
|
||||
if($generatorType === self::GENERATOR_FLAT and isset($options["preset"])){
|
||||
|
@ -21,10 +21,8 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace pocketmine\level\format\io\region;
|
||||
|
||||
|
||||
class CorruptedRegionException extends RegionException{
|
||||
|
||||
}
|
||||
|
@ -21,10 +21,8 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace pocketmine\level\format\io\region;
|
||||
|
||||
|
||||
class RegionException extends \RuntimeException{
|
||||
|
||||
}
|
||||
|
@ -59,7 +59,6 @@ abstract class Generator{
|
||||
*/
|
||||
abstract public function __construct(array $settings = []);
|
||||
|
||||
|
||||
public function init(ChunkManager $level, Random $random) : void{
|
||||
$this->level = $level;
|
||||
$this->random = $random;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user