mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Merge branch 'release/3.3' into release/3.4
This commit is contained in:
commit
6dd2597934
@ -173,6 +173,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks a supplied username and checks it is valid.
|
* Checks a supplied username and checks it is valid.
|
||||||
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
@ -1322,6 +1323,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
* TODO: remove this when Spectator Mode gets added properly to MCPE
|
* TODO: remove this when Spectator Mode gets added properly to MCPE
|
||||||
*
|
*
|
||||||
* @param int $gamemode
|
* @param int $gamemode
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public static function getClientFriendlyGamemode(int $gamemode) : int{
|
public static function getClientFriendlyGamemode(int $gamemode) : int{
|
||||||
@ -2229,6 +2231,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
* Don't expect much from this handler. Most of it is roughly hacked and duct-taped together.
|
* Don't expect much from this handler. Most of it is roughly hacked and duct-taped together.
|
||||||
*
|
*
|
||||||
* @param InventoryTransactionPacket $packet
|
* @param InventoryTransactionPacket $packet
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function handleInventoryTransaction(InventoryTransactionPacket $packet) : bool{
|
public function handleInventoryTransaction(InventoryTransactionPacket $packet) : bool{
|
||||||
@ -2808,6 +2811,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
* Drops an item on the ground in front of the player. Returns if the item drop was successful.
|
* Drops an item on the ground in front of the player. Returns if the item drop was successful.
|
||||||
*
|
*
|
||||||
* @param Item $item
|
* @param Item $item
|
||||||
|
*
|
||||||
* @return bool if the item was dropped or if the item was null
|
* @return bool if the item was dropped or if the item was null
|
||||||
*/
|
*/
|
||||||
public function dropItem(Item $item) : bool{
|
public function dropItem(Item $item) : bool{
|
||||||
|
@ -1003,6 +1003,7 @@ class Server{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
*
|
||||||
* @param Level $level
|
* @param Level $level
|
||||||
*/
|
*/
|
||||||
public function removeLevel(Level $level) : void{
|
public function removeLevel(Level $level) : void{
|
||||||
|
@ -411,6 +411,7 @@ class BlockFactory{
|
|||||||
* Returns whether a specified block ID is already registered in the block factory.
|
* Returns whether a specified block ID is already registered in the block factory.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function isRegistered(int $id) : bool{
|
public static function isRegistered(int $id) : bool{
|
||||||
|
@ -95,6 +95,7 @@ class CommandReader extends Thread{
|
|||||||
* Checks if the specified stream is a FIFO pipe.
|
* Checks if the specified stream is a FIFO pipe.
|
||||||
*
|
*
|
||||||
* @param resource $stream
|
* @param resource $stream
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function isPipe($stream) : bool{
|
private function isPipe($stream) : bool{
|
||||||
|
@ -54,6 +54,7 @@ interface CommandSender extends Permissible{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the line height used for command output pagination for this command sender. `null` will reset it to default.
|
* Sets the line height used for command output pagination for this command sender. `null` will reset it to default.
|
||||||
|
*
|
||||||
* @param int|null $height
|
* @param int|null $height
|
||||||
*/
|
*/
|
||||||
public function setScreenLineHeight(int $height = null);
|
public function setScreenLineHeight(int $height = null);
|
||||||
|
@ -144,6 +144,7 @@ class DataPropertyManager{
|
|||||||
public function getItem(int $key) : ?Item{
|
public function getItem(int $key) : ?Item{
|
||||||
$value = $this->getPropertyValue($key, Entity::DATA_TYPE_SLOT);
|
$value = $this->getPropertyValue($key, Entity::DATA_TYPE_SLOT);
|
||||||
assert($value instanceof Item or $value === null);
|
assert($value instanceof Item or $value === null);
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +81,7 @@ class EffectInstance{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $duration
|
* @param int $duration
|
||||||
|
*
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
|
@ -936,6 +936,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
|||||||
* Called to tick entities while dead. Returns whether the entity should be flagged for despawn yet.
|
* Called to tick entities while dead. Returns whether the entity should be flagged for despawn yet.
|
||||||
*
|
*
|
||||||
* @param int $tickDiff
|
* @param int $tickDiff
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function onDeathUpdate(int $tickDiff) : bool{
|
protected function onDeathUpdate(int $tickDiff) : bool{
|
||||||
@ -1390,7 +1391,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
|||||||
Timings::$timerEntityBaseTick->stopTiming();
|
Timings::$timerEntityBaseTick->stopTiming();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->timings->stopTiming();
|
$this->timings->stopTiming();
|
||||||
|
|
||||||
//if($this->isStatic())
|
//if($this->isStatic())
|
||||||
@ -2074,6 +2074,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
|||||||
* Wrapper around {@link Entity#getDataFlag} for generic data flag reading.
|
* Wrapper around {@link Entity#getDataFlag} for generic data flag reading.
|
||||||
*
|
*
|
||||||
* @param int $flagId
|
* @param int $flagId
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getGenericFlag(int $flagId) : bool{
|
public function getGenericFlag(int $flagId) : bool{
|
||||||
|
@ -889,6 +889,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
|||||||
* Wrapper around {@link Entity#getDataFlag} for player-specific data flag reading.
|
* Wrapper around {@link Entity#getDataFlag} for player-specific data flag reading.
|
||||||
*
|
*
|
||||||
* @param int $flagId
|
* @param int $flagId
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getPlayerFlag(int $flagId) : bool{
|
public function getPlayerFlag(int $flagId) : bool{
|
||||||
|
@ -330,6 +330,7 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends the mob's potion effects to the specified player.
|
* Sends the mob's potion effects to the specified player.
|
||||||
|
*
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function sendPotionEffects(Player $player) : void{
|
public function sendPotionEffects(Player $player) : void{
|
||||||
@ -773,6 +774,7 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the number of air ticks left in the entity's air supply.
|
* Sets the number of air ticks left in the entity's air supply.
|
||||||
|
*
|
||||||
* @param int $ticks
|
* @param int $ticks
|
||||||
*/
|
*/
|
||||||
public function setAirSupplyTicks(int $ticks) : void{
|
public function setAirSupplyTicks(int $ticks) : void{
|
||||||
@ -789,6 +791,7 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the maximum amount of air ticks the air supply can hold.
|
* Sets the maximum amount of air ticks the air supply can hold.
|
||||||
|
*
|
||||||
* @param int $ticks
|
* @param int $ticks
|
||||||
*/
|
*/
|
||||||
public function setMaxAirSupplyTicks(int $ticks) : void{
|
public function setMaxAirSupplyTicks(int $ticks) : void{
|
||||||
|
@ -73,6 +73,7 @@ class PaintingMotive{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return PaintingMotive|null
|
* @return PaintingMotive|null
|
||||||
*/
|
*/
|
||||||
public static function getMotiveByName(string $name) : ?PaintingMotive{
|
public static function getMotiveByName(string $name) : ?PaintingMotive{
|
||||||
|
@ -27,8 +27,8 @@ use pocketmine\block\Block;
|
|||||||
use pocketmine\block\BlockFactory;
|
use pocketmine\block\BlockFactory;
|
||||||
use pocketmine\entity\EffectInstance;
|
use pocketmine\entity\EffectInstance;
|
||||||
use pocketmine\entity\Living;
|
use pocketmine\entity\Living;
|
||||||
use pocketmine\event\entity\ProjectileHitEntityEvent;
|
|
||||||
use pocketmine\event\entity\ProjectileHitBlockEvent;
|
use pocketmine\event\entity\ProjectileHitBlockEvent;
|
||||||
|
use pocketmine\event\entity\ProjectileHitEntityEvent;
|
||||||
use pocketmine\event\entity\ProjectileHitEvent;
|
use pocketmine\event\entity\ProjectileHitEvent;
|
||||||
use pocketmine\item\Potion;
|
use pocketmine\item\Potion;
|
||||||
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
||||||
@ -151,6 +151,7 @@ class SplashPotion extends Throwable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether this splash potion will create an area-effect-cloud when it lands.
|
* Sets whether this splash potion will create an area-effect-cloud when it lands.
|
||||||
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
*/
|
*/
|
||||||
public function setLinger(bool $value = true) : void{
|
public function setLinger(bool $value = true) : void{
|
||||||
|
@ -31,6 +31,7 @@ abstract class ExperienceUtils{
|
|||||||
* Calculates and returns the amount of XP needed to get from level 0 to level $level
|
* Calculates and returns the amount of XP needed to get from level 0 to level $level
|
||||||
*
|
*
|
||||||
* @param int $level
|
* @param int $level
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public static function getXpToReachLevel(int $level) : int{
|
public static function getXpToReachLevel(int $level) : int{
|
||||||
|
@ -63,6 +63,7 @@ class PlayerChangeSkinEvent extends PlayerEvent implements Cancellable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Skin $skin
|
* @param Skin $skin
|
||||||
|
*
|
||||||
* @throws \InvalidArgumentException if the specified skin is not valid
|
* @throws \InvalidArgumentException if the specified skin is not valid
|
||||||
*/
|
*/
|
||||||
public function setNewSkin(Skin $skin) : void{
|
public function setNewSkin(Skin $skin) : void{
|
||||||
|
@ -384,6 +384,7 @@ abstract class BaseInventory implements Inventory{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the inventory window from all players currently viewing it.
|
* Removes the inventory window from all players currently viewing it.
|
||||||
|
*
|
||||||
* @param bool $force Force removal of permanent windows such as the player's own inventory. Used internally.
|
* @param bool $force Force removal of permanent windows such as the player's own inventory. Used internally.
|
||||||
*/
|
*/
|
||||||
public function removeAllViewers(bool $force = false) : void{
|
public function removeAllViewers(bool $force = false) : void{
|
||||||
|
@ -244,6 +244,7 @@ interface Inventory{
|
|||||||
* Returns whether the specified slot exists in the inventory.
|
* Returns whether the specified slot exists in the inventory.
|
||||||
*
|
*
|
||||||
* @param int $slot
|
* @param int $slot
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function slotExists(int $slot) : bool;
|
public function slotExists(int $slot) : bool;
|
||||||
|
@ -88,6 +88,7 @@ class PlayerInventory extends BaseInventory{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $slot
|
* @param int $slot
|
||||||
|
*
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
private function throwIfNotHotbarSlot(int $slot){
|
private function throwIfNotHotbarSlot(int $slot){
|
||||||
@ -100,6 +101,7 @@ class PlayerInventory extends BaseInventory{
|
|||||||
* Returns the item in the specified hotbar slot.
|
* Returns the item in the specified hotbar slot.
|
||||||
*
|
*
|
||||||
* @param int $hotbarSlot
|
* @param int $hotbarSlot
|
||||||
|
*
|
||||||
* @return Item
|
* @return Item
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException if the hotbar slot index is out of range
|
* @throws \InvalidArgumentException if the hotbar slot index is out of range
|
||||||
@ -160,6 +162,7 @@ class PlayerInventory extends BaseInventory{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends the currently-held item to specified targets.
|
* Sends the currently-held item to specified targets.
|
||||||
|
*
|
||||||
* @param Player|Player[] $target
|
* @param Player|Player[] $target
|
||||||
*/
|
*/
|
||||||
public function sendHeldItem($target){
|
public function sendHeldItem($target){
|
||||||
|
@ -55,6 +55,7 @@ class DropItemAction extends InventoryAction{
|
|||||||
* Drops the target item in front of the player.
|
* Drops the target item in front of the player.
|
||||||
*
|
*
|
||||||
* @param Player $source
|
* @param Player $source
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function execute(Player $source) : bool{
|
public function execute(Player $source) : bool{
|
||||||
|
@ -53,6 +53,7 @@ abstract class Armor extends Durable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the dyed colour of this armour piece. This generally only applies to leather armour.
|
* Sets the dyed colour of this armour piece. This generally only applies to leather armour.
|
||||||
|
*
|
||||||
* @param Color $color
|
* @param Color $color
|
||||||
*/
|
*/
|
||||||
public function setCustomColor(Color $color) : void{
|
public function setCustomColor(Color $color) : void{
|
||||||
|
@ -38,6 +38,7 @@ abstract class Durable extends Item{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether the item will take damage when used.
|
* Sets whether the item will take damage when used.
|
||||||
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
*/
|
*/
|
||||||
public function setUnbreakable(bool $value = true){
|
public function setUnbreakable(bool $value = true){
|
||||||
@ -46,6 +47,7 @@ abstract class Durable extends Item{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies damage to the item.
|
* Applies damage to the item.
|
||||||
|
*
|
||||||
* @param int $amount
|
* @param int $amount
|
||||||
*
|
*
|
||||||
* @return bool if any damage was applied to the item
|
* @return bool if any damage was applied to the item
|
||||||
|
@ -523,6 +523,7 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return NamedTag|null
|
* @return NamedTag|null
|
||||||
*/
|
*/
|
||||||
public function getNamedTagEntry(string $name) : ?NamedTag{
|
public function getNamedTagEntry(string $name) : ?NamedTag{
|
||||||
@ -557,6 +558,7 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Item's NBT from the supplied CompoundTag object.
|
* Sets the Item's NBT from the supplied CompoundTag object.
|
||||||
|
*
|
||||||
* @param CompoundTag $tag
|
* @param CompoundTag $tag
|
||||||
*
|
*
|
||||||
* @return Item
|
* @return Item
|
||||||
@ -589,6 +591,7 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $count
|
* @param int $count
|
||||||
|
*
|
||||||
* @return Item
|
* @return Item
|
||||||
*/
|
*/
|
||||||
public function setCount(int $count) : Item{
|
public function setCount(int $count) : Item{
|
||||||
@ -669,6 +672,7 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $meta
|
* @param int $meta
|
||||||
|
*
|
||||||
* @return Item
|
* @return Item
|
||||||
*/
|
*/
|
||||||
public function setDamage(int $meta) : Item{
|
public function setDamage(int $meta) : Item{
|
||||||
@ -779,6 +783,7 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
* Returns whether the item was changed, for example count decrease or durability change.
|
* Returns whether the item was changed, for example count decrease or durability change.
|
||||||
*
|
*
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function onReleaseUsing(Player $player) : bool{
|
public function onReleaseUsing(Player $player) : bool{
|
||||||
@ -844,6 +849,7 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the specified item stack has the same ID, damage, NBT and count as this item stack.
|
* Returns whether the specified item stack has the same ID, damage, NBT and count as this item stack.
|
||||||
|
*
|
||||||
* @param Item $other
|
* @param Item $other
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
@ -888,6 +894,7 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
* Returns an Item from properties created in an array by {@link Item#jsonSerialize}
|
* Returns an Item from properties created in an array by {@link Item#jsonSerialize}
|
||||||
*
|
*
|
||||||
* @param array $data
|
* @param array $data
|
||||||
|
*
|
||||||
* @return Item
|
* @return Item
|
||||||
*/
|
*/
|
||||||
final public static function jsonDeserialize(array $data) : Item{
|
final public static function jsonDeserialize(array $data) : Item{
|
||||||
|
@ -71,6 +71,7 @@ class Potion extends Item implements Consumable{
|
|||||||
* Returns a list of effects applied by potions with the specified ID.
|
* Returns a list of effects applied by potions with the specified ID.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
|
*
|
||||||
* @return EffectInstance[]
|
* @return EffectInstance[]
|
||||||
*/
|
*/
|
||||||
public static function getPotionEffectsById(int $id) : array{
|
public static function getPotionEffectsById(int $id) : array{
|
||||||
|
@ -27,8 +27,8 @@ use pocketmine\entity\Entity;
|
|||||||
use pocketmine\entity\projectile\Projectile;
|
use pocketmine\entity\projectile\Projectile;
|
||||||
use pocketmine\event\entity\ProjectileLaunchEvent;
|
use pocketmine\event\entity\ProjectileLaunchEvent;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
|
||||||
use pocketmine\nbt\tag\CompoundTag;
|
use pocketmine\nbt\tag\CompoundTag;
|
||||||
|
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
||||||
use pocketmine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
abstract class ProjectileItem extends Item{
|
abstract class ProjectileItem extends Item{
|
||||||
|
@ -69,6 +69,7 @@ class EnchantmentInstance{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the level of the enchantment.
|
* Sets the level of the enchantment.
|
||||||
|
*
|
||||||
* @param int $level
|
* @param int $level
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
|
@ -62,6 +62,7 @@ class ProtectionEnchantment extends Enchantment{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the base EPF this enchantment type offers for the given enchantment level.
|
* Returns the base EPF this enchantment type offers for the given enchantment level.
|
||||||
|
*
|
||||||
* @param int $level
|
* @param int $level
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
@ -72,6 +73,7 @@ class ProtectionEnchantment extends Enchantment{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this enchantment type offers protection from the specified damage source's cause.
|
* Returns whether this enchantment type offers protection from the specified damage source's cause.
|
||||||
|
*
|
||||||
* @param EntityDamageEvent $event
|
* @param EntityDamageEvent $event
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
@ -292,6 +292,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $str
|
* @param string $str
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public static function getDifficultyFromString(string $str) : int{
|
public static function getDifficultyFromString(string $str) : int{
|
||||||
|
@ -366,6 +366,7 @@ class Chunk{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the heightmap value at the specified X/Z chunk block coordinates
|
* Returns the heightmap value at the specified X/Z chunk block coordinates
|
||||||
|
*
|
||||||
* @param int $x 0-15
|
* @param int $x 0-15
|
||||||
* @param int $z 0-15
|
* @param int $z 0-15
|
||||||
* @param int $value
|
* @param int $value
|
||||||
@ -465,6 +466,7 @@ class Chunk{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a column of block IDs from bottom to top at the specified X/Z chunk block coordinates.
|
* Returns a column of block IDs from bottom to top at the specified X/Z chunk block coordinates.
|
||||||
|
*
|
||||||
* @param int $x 0-15
|
* @param int $x 0-15
|
||||||
* @param int $z 0-15
|
* @param int $z 0-15
|
||||||
*
|
*
|
||||||
@ -475,11 +477,13 @@ class Chunk{
|
|||||||
foreach($this->subChunks as $subChunk){
|
foreach($this->subChunks as $subChunk){
|
||||||
$result .= $subChunk->getBlockIdColumn($x, $z);
|
$result .= $subChunk->getBlockIdColumn($x, $z);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a column of block meta values from bottom to top at the specified X/Z chunk block coordinates.
|
* Returns a column of block meta values from bottom to top at the specified X/Z chunk block coordinates.
|
||||||
|
*
|
||||||
* @param int $x 0-15
|
* @param int $x 0-15
|
||||||
* @param int $z 0-15
|
* @param int $z 0-15
|
||||||
*
|
*
|
||||||
@ -495,6 +499,7 @@ class Chunk{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a column of sky light values from bottom to top at the specified X/Z chunk block coordinates.
|
* Returns a column of sky light values from bottom to top at the specified X/Z chunk block coordinates.
|
||||||
|
*
|
||||||
* @param int $x 0-15
|
* @param int $x 0-15
|
||||||
* @param int $z 0-15
|
* @param int $z 0-15
|
||||||
*
|
*
|
||||||
@ -510,6 +515,7 @@ class Chunk{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a column of block light values from bottom to top at the specified X/Z chunk block coordinates.
|
* Returns a column of block light values from bottom to top at the specified X/Z chunk block coordinates.
|
||||||
|
*
|
||||||
* @param int $x 0-15
|
* @param int $x 0-15
|
||||||
* @param int $z 0-15
|
* @param int $z 0-15
|
||||||
*
|
*
|
||||||
|
@ -27,6 +27,7 @@ interface SubChunkInterface{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bool $checkLight
|
* @param bool $checkLight
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isEmpty(bool $checkLight = true) : bool;
|
public function isEmpty(bool $checkLight = true) : bool;
|
||||||
|
@ -148,6 +148,7 @@ interface LevelProvider{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the world difficulty.
|
* Sets the world difficulty.
|
||||||
|
*
|
||||||
* @param int $difficulty
|
* @param int $difficulty
|
||||||
*/
|
*/
|
||||||
public function setDifficulty(int $difficulty);
|
public function setDifficulty(int $difficulty);
|
||||||
|
@ -160,6 +160,7 @@ class PacketPool{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $pid
|
* @param int $pid
|
||||||
|
*
|
||||||
* @return DataPacket
|
* @return DataPacket
|
||||||
*/
|
*/
|
||||||
public static function getPacketById(int $pid) : DataPacket{
|
public static function getPacketById(int $pid) : DataPacket{
|
||||||
@ -168,6 +169,7 @@ class PacketPool{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $buffer
|
* @param string $buffer
|
||||||
|
*
|
||||||
* @return DataPacket
|
* @return DataPacket
|
||||||
*/
|
*/
|
||||||
public static function getPacket(string $buffer) : DataPacket{
|
public static function getPacket(string $buffer) : DataPacket{
|
||||||
|
@ -92,6 +92,7 @@ class NetworkInventoryAction{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param InventoryTransactionPacket $packet
|
* @param InventoryTransactionPacket $packet
|
||||||
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function read(InventoryTransactionPacket $packet){
|
public function read(InventoryTransactionPacket $packet){
|
||||||
|
@ -119,6 +119,7 @@ class BanEntry{
|
|||||||
* @link https://bugs.php.net/bug.php?id=75992
|
* @link https://bugs.php.net/bug.php?id=75992
|
||||||
*
|
*
|
||||||
* @param \DateTime $dateTime
|
* @param \DateTime $dateTime
|
||||||
|
*
|
||||||
* @throws \RuntimeException if the argument can't be parsed from a formatted date string
|
* @throws \RuntimeException if the argument can't be parsed from a formatted date string
|
||||||
*/
|
*/
|
||||||
private static function validateDate(\DateTime $dateTime) : void{
|
private static function validateDate(\DateTime $dateTime) : void{
|
||||||
|
@ -355,6 +355,7 @@ class PluginManager{
|
|||||||
* Returns whether a specified API version string is considered compatible with the server's API version.
|
* Returns whether a specified API version string is considered compatible with the server's API version.
|
||||||
*
|
*
|
||||||
* @param string ...$versions
|
* @param string ...$versions
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isCompatibleApi(string ...$versions) : bool{
|
public function isCompatibleApi(string ...$versions) : bool{
|
||||||
|
@ -138,6 +138,7 @@ class ResourcePackManager{
|
|||||||
* Returns the resource pack matching the specified UUID string, or null if the ID was not recognized.
|
* Returns the resource pack matching the specified UUID string, or null if the ID was not recognized.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
|
*
|
||||||
* @return ResourcePack|null
|
* @return ResourcePack|null
|
||||||
*/
|
*/
|
||||||
public function getPackById(string $id){
|
public function getPackById(string $id){
|
||||||
|
@ -32,6 +32,7 @@ class ZippedResourcePack implements ResourcePack{
|
|||||||
* TODO: add more manifest validation
|
* TODO: add more manifest validation
|
||||||
*
|
*
|
||||||
* @param \stdClass $manifest
|
* @param \stdClass $manifest
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function verifyManifest(\stdClass $manifest) : bool{
|
public static function verifyManifest(\stdClass $manifest) : bool{
|
||||||
|
@ -129,6 +129,7 @@ abstract class AsyncTask extends Collectable{
|
|||||||
* @see AsyncWorker::getFromThreadStore()
|
* @see AsyncWorker::getFromThreadStore()
|
||||||
*
|
*
|
||||||
* @param string $identifier
|
* @param string $identifier
|
||||||
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getFromThreadStore(string $identifier){
|
public function getFromThreadStore(string $identifier){
|
||||||
|
@ -102,6 +102,7 @@ class AsyncWorker extends Worker{
|
|||||||
* Objects stored in this storage may ONLY be retrieved while the task is running.
|
* Objects stored in this storage may ONLY be retrieved while the task is running.
|
||||||
*
|
*
|
||||||
* @param string $identifier
|
* @param string $identifier
|
||||||
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getFromThreadStore(string $identifier){
|
public function getFromThreadStore(string $identifier){
|
||||||
|
@ -101,6 +101,7 @@ class AutoUpdater{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows a warning to a player to tell them there is an update available
|
* Shows a warning to a player to tell them there is an update available
|
||||||
|
*
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function showPlayerUpdate(Player $player){
|
public function showPlayerUpdate(Player $player){
|
||||||
|
@ -47,6 +47,7 @@ class Color{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the alpha (opacity) value of this colour, lower = more transparent
|
* Sets the alpha (opacity) value of this colour, lower = more transparent
|
||||||
|
*
|
||||||
* @param int $a
|
* @param int $a
|
||||||
*/
|
*/
|
||||||
public function setA(int $a){
|
public function setA(int $a){
|
||||||
@ -63,6 +64,7 @@ class Color{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the red value of this colour.
|
* Sets the red value of this colour.
|
||||||
|
*
|
||||||
* @param int $r
|
* @param int $r
|
||||||
*/
|
*/
|
||||||
public function setR(int $r){
|
public function setR(int $r){
|
||||||
@ -79,6 +81,7 @@ class Color{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the green value of this colour.
|
* Sets the green value of this colour.
|
||||||
|
*
|
||||||
* @param int $g
|
* @param int $g
|
||||||
*/
|
*/
|
||||||
public function setG(int $g){
|
public function setG(int $g){
|
||||||
@ -95,6 +98,7 @@ class Color{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the blue value of this colour.
|
* Sets the blue value of this colour.
|
||||||
|
*
|
||||||
* @param int $b
|
* @param int $b
|
||||||
*/
|
*/
|
||||||
public function setB(int $b){
|
public function setB(int $b){
|
||||||
@ -105,6 +109,7 @@ class Color{
|
|||||||
* Mixes the supplied list of colours together to produce a result colour.
|
* Mixes the supplied list of colours together to produce a result colour.
|
||||||
*
|
*
|
||||||
* @param Color ...$colors
|
* @param Color ...$colors
|
||||||
|
*
|
||||||
* @return Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public static function mix(Color ...$colors) : Color{
|
public static function mix(Color ...$colors) : Color{
|
||||||
@ -127,6 +132,7 @@ class Color{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Color from the supplied RGB colour code (24-bit)
|
* Returns a Color from the supplied RGB colour code (24-bit)
|
||||||
|
*
|
||||||
* @param int $code
|
* @param int $code
|
||||||
*
|
*
|
||||||
* @return Color
|
* @return Color
|
||||||
|
@ -232,6 +232,7 @@ class Config{
|
|||||||
* Sets the options for the JSON encoding when saving
|
* Sets the options for the JSON encoding when saving
|
||||||
*
|
*
|
||||||
* @param int $options
|
* @param int $options
|
||||||
|
*
|
||||||
* @return Config $this
|
* @return Config $this
|
||||||
* @throws \RuntimeException if the Config is not in JSON
|
* @throws \RuntimeException if the Config is not in JSON
|
||||||
* @see json_encode
|
* @see json_encode
|
||||||
@ -250,6 +251,7 @@ class Config{
|
|||||||
* Enables the given option in addition to the currently set JSON options
|
* Enables the given option in addition to the currently set JSON options
|
||||||
*
|
*
|
||||||
* @param int $option
|
* @param int $option
|
||||||
|
*
|
||||||
* @return Config $this
|
* @return Config $this
|
||||||
* @throws \RuntimeException if the Config is not in JSON
|
* @throws \RuntimeException if the Config is not in JSON
|
||||||
* @see json_encode
|
* @see json_encode
|
||||||
@ -268,6 +270,7 @@ class Config{
|
|||||||
* Disables the given option for the JSON encoding when saving
|
* Disables the given option for the JSON encoding when saving
|
||||||
*
|
*
|
||||||
* @param int $option
|
* @param int $option
|
||||||
|
*
|
||||||
* @return Config $this
|
* @return Config $this
|
||||||
* @throws \RuntimeException if the Config is not in JSON
|
* @throws \RuntimeException if the Config is not in JSON
|
||||||
* @see json_encode
|
* @see json_encode
|
||||||
|
@ -47,6 +47,7 @@ class UUID{
|
|||||||
*
|
*
|
||||||
* @param string $uuid
|
* @param string $uuid
|
||||||
* @param int $version
|
* @param int $version
|
||||||
|
*
|
||||||
* @return UUID
|
* @return UUID
|
||||||
*/
|
*/
|
||||||
public static function fromString(string $uuid, int $version = null) : UUID{
|
public static function fromString(string $uuid, int $version = null) : UUID{
|
||||||
@ -58,6 +59,7 @@ class UUID{
|
|||||||
*
|
*
|
||||||
* @param string $uuid
|
* @param string $uuid
|
||||||
* @param int $version
|
* @param int $version
|
||||||
|
*
|
||||||
* @return UUID
|
* @return UUID
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
@ -74,6 +76,7 @@ class UUID{
|
|||||||
* Creates an UUIDv3 from binary data or list of binary data
|
* Creates an UUIDv3 from binary data or list of binary data
|
||||||
*
|
*
|
||||||
* @param string ...$data
|
* @param string ...$data
|
||||||
|
*
|
||||||
* @return UUID
|
* @return UUID
|
||||||
*/
|
*/
|
||||||
public static function fromData(string ...$data) : UUID{
|
public static function fromData(string ...$data) : UUID{
|
||||||
|
@ -246,6 +246,7 @@ class Utils{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bool $recalculate
|
* @param bool $recalculate
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public static function getCoreCount(bool $recalculate = false) : int{
|
public static function getCoreCount(bool $recalculate = false) : int{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user