Releases: pmmp/PocketMine-MP
PocketMine-MP 1.7dev-501 with API 3.0.0-ALPHA10
For Minecraft: Bedrock Edition 1.2.6
API additions, gameplay additions, bugfixes, more performance, liquids refactor
This version is an alpha - it is not feature complete. Please do not create issues for missing gameplay features.
This build does not have major breaking API changes, but has many new feature additions, so the API has been bumped to 3.0.0-ALPHA10.
This will likely be the last release in the ALPHAX series as we are planning to move to a new versioning system. Please see #1769 for details.
Please use our issue tracker to report bugs.
Notable changes
Core
General
- RakLib and PocketMine-SPL are now Composer libraries instead of submodules. The installation process is exactly as before - simply run
composer install [...optional extra flags]
and the correct versions of RakLib and SPL will be installed. - The server will no longer crash when garbage is written in pocketmine.yml for
worlds
oraliases
. - Minecraft PE 1.2 LevelDB worlds are now supported with https://github.com/pmmp/php-leveldb version 0.2.1 and the latest version of https://github/com/pmmp/leveldb-mcpe on branch
pmmp-merge
. server.properties
is no longer overwritten when stopping the server (finally!). However, there is one caveat - IF it has been modified at runtime (which rarely happens) without being saved, then it will still be overwritten.
Performance changes
- Serialized spawn compounds are now cached by tiles for faster spawning. This significantly reduces chunk serialization overhead on the main thread when a chunk contains lots of tiles (since tile NBT has to be encoded on the main thread, and NBT is particularly slow). Note that
Spawnable->onChanged()
MUST be called by implementations when their NBT changes, to ensure players see changes properly. CraftingManager
now caches a pre-compressed crafting-data packet to reduce workload on player join.- Player skin geometry is now automatically stripped of pretty formatting to cut down on bandwidth overhead, since the geometry sizes tend to be very large.
Level->isInWorld()
is no longer so horribly (relatively) expensive since the world height is now stored as a field in the level for faster comparison.- Liquid performance has been drastically improved.
- Light population performance has been drastically improved using subchunk direct accessing (see below in API section).
Entity
- Fixed errors when an effect duration becomes negative due to the level tick rate being > 1 (such as under lag when auto-tick-rate is enabled).
Level
- The
disable-block-ticking
config in pocketmine.yml now works correctly. - Fixed crashes when
Level->getSafeSpawn()
encounters a non-full block.
Locale
- Fixed incorrect translation key being used for level generation errors.
NBT
- All known core code is now making use of the new CompoundTag API. Note that the original method (using dynamic fields) is now deprecated and should be avoided, as it will cease to work in the future.
Player
- Players now respawn in the correct spawn world when dying in a different world. This was due to a bug with
Position->add()
returning aVector3
unexpectedly.
Resource packs
- Resource pack UUIDs are now non-case-sensitive.
API
Block
- Added API method
Block->getPickedItem()
Commands
- The JSON mess leftovers from pre-1.2 in commands have been obliterated. Good riddance.
Entity
Human->sendSkin()
now accepts and defaults to NULL for itstargets
parameter. For aHuman
, using NULL will broadcast its skin to all players who can see it. For aPlayer
, it will be broadcasted to all online players (for player list purposes).Entity->setCanClimb()
now has a default value of TRUE for its first parameter.Living->setMaxAirSupplyTicks()
now actually sets the MAX air ticks instead of the current air ticks.Living->addEffect()
now returns a boolean to indicate success.- Added API methods
Entity->flagForDespawn()
andEntity->isFlaggedForDespawn()
. These should be used instead ofkill()/close()
andisAlive()
respectively when wanting to delete an entity without killing it and creating drops. Setting the despawn flag will cause the entity to be deleted on the next tick.
Events
- Block face click vector is now accessible in
PlayerInteractEvent
forRIGHT_CLICK_BLOCK
action. I don't know why this wasn't already accessible, but now you can go and make yourself some nice touchscreens with maps. - Player data is once again saved after
PlayerQuitEvent
. This resolves issues with plugins doing odd things like killing players on quit. - Cancelling
EntityEffectAddEvent
andEntityEffectRemoveEvent
now work correctly when cancelled.
Inventory
SlotChangeAction
now checks if the slot number is valid before trying to get items from the inventory - this fixes errors with players putting items at out of bounds offsets when PlayerInteractEvent is cancelled on a crafting table.
Items
- Added API methods
Armor->getCustomColor()
andArmor->setCustomColor()
Level
- Added API method
Chunk->getSavableEntities()
Level->getName()
no longer crashes after the level has been unloaded and the provider doesn't exist anymore.- Added a
SubChunkIteratorManager
to modularize the code for faster subchunk accessing. This is now used inLightUpdate
andExplosion
and provides drastic performance enhancements.
NBT
- Extra parameters have been added to
CompoundTag
's reading methods to allow returning the default when the tag type doesn't match expected. - Extra parameters have been added to
CompoundTag
's writing methods to allow forcefully overwriting existing tags with a type that is not what was expected.
Player
- Added API method
Player->getLocale()
. This returns a locale code of the styleen_US
. - Added API method
Player->getPing()
. This is reported by RakLib every 5 seconds and returns the player's last measured latency in milliseconds. - Fixed bugs with bad time values for
Player->hasPlayedBefore()
by reusing calculated time when generating player data for the first time.
Resource packs
- Added API method
ResourcePack->getPath()
- this returns a path to the resource pack's file(s).
Server
Server->getConfigBoolean()
has been deprecated; its replacement isServer->getConfigBool()
. The original will be removed in a later version.- Added API method
Server->getResourcePath()
- this points to the server's file resource directory in the source/phar (src/pocketmine/resources/
).
Utils
- Added API method
Config->removeNested()
- Added API method
Color::mix()
Gameplay
Blocks
-
Liquids have undergone a major refactor, the following issues have been fixed:
- CPU leaks when liquids try to flow into other liquids have been fixed
- Liquids no longer flow all over the place when they have a downwards path of least resistance
- Liquids no longer flow in all directions when flowing down a slope instead of just down the slope
- Lava is no longer impossible to get rid of when deleting the source block
- Lava no longer turns to cobblestone when flowing over the top of water
- Performance has been drastically improved
- Mobs now move correctly when liquids flow around them
-
Added the following blocks: ender chest (#1462), banner (#1331)
-
Block-picking crops will now give the correct item instead of the crop block itself.
Commands
- Basic command lists are now visible on the client when typing
/
. Arguments are not yet implemented and will always show[args: message]
(this will come in the future). - Fixed a crash when attempting to create ListTags with JSON in the
/give
command.
Entities
- Teleported entities will no longer continue to take damage from the blocks at their origin.
- Entity death smoke cloud now works correctly.
Items
- Added the following items: banner, rotten flesh
Level
- Implemented sky light reduction based on time of day. This is used for various things including mob spawning (not implemented yet), grass growth and crop growth (not implemented yet).
Player
- Falling more than 3.5 blocks now correctly causes fall damage (incorrect floor() instead of ceil()).
- Added a hack to stop players falling into the ground on spawn.
PocketMine-MP 1.7dev-318 with API 3.0.0-ALPHA9
For Minecraft: Bedrock Edition 1.2.0.81
New skins API, new CompoundTag API, performance improvements
This version is an alpha snapshot, is NOT FEATURE COMPLETE and may be unstable. Please use our issue tracker to report bugs.
Please do not create issues for missing gameplay features.
This build has breaking API changes, so the API has been bumped to 3.0.0-ALPHA9. These changes are NOT yet complete.
Notable changes
Core
General
- Minimum PHP version has been upped to PHP 7.2.0RC3 due to more bugfixes needed for ZTS mode.
- Fixed PocketMine.php compatibility with PHP 5 (needed for incompatible PHP version messages to work correctly)
- Incompatible PHP version message on startup is now more clear and tells the user what PHP version they are attempting to use.
Block
- Fixed a crash when Leaves2 is mined with a damage value > 1
Entity
- Fixed debug spam when entities are created over zero tick diffs.
- Entities which are saved when on fire will now appear on fire when they are next loaded.
Level
- Fixed performance degradation in
Level->getBlock()
which had very widespread effects. - Fixed performance degradation with chunk ticking caused by expensive subchunk empty checks.
- Difficulty levels can now be set per-world, and can be set in pocketmine.yml using the
difficulty
key under the worlds section per-world.
Network
- Chunk-packet caching is now non-optional, offering better performance (#1448)
- Compression level 0 in pocketmine.yml is no longer allowed and will be reset to the default if used.
- Fixed a crash which occurred during login verification due to trying to read a nonexistent public key
- Fixed ridiculous network upload & download statistics when the title ticker was disabled
- Removed a redundant asserting function in packet reads which was degrading performance.
API
General
- Added
\pocketmine\NAME
constant.
Block
- Basic support has been added for separation of block bounding boxes and collision boxes.
Block->getCollisionBoxes()
has been added.
Command
- Added API method
SimpleCommandMap->unregister()
to allow completely removing registered commands.
Entity
Skins
A new Skin
class has been added to allow proper management of player skins.
The following classes have been added:
pocketmine\entity\Skin
The following events have been added:
PlayerChangeSkinEvent
, called when a player changes their skin
The following API methods have been removed:
Human->getSkinId() : string
Human->getSkinData() : string
The following API methods have been added:
Human->getSkin() : Skin
Human->sendSkin(Player[])
The following methods have signature changes:Human->setSkin()
now acceptsSkin
instead ofstring, string
Server->updatePlayerListData()
now acceptsSkin
instead of the old skin string parameters.
Other changes
- Projectile-related classes such as
Projectile
,ProjectileSource
,Snowball
etc have been moved to anentity\projectile
namespace. - Added
EntityIds
interface containing named constants for Minecraft: Bedrock entity type IDs. - Added API methods
Entity->canSaveWithChunk()
andEntity->setCanSaveWithChunk()
. These methods allow marking an entity as non-permanent so that it does not get saved to disk when the chunk is saved. - Added API method
Entity::createBaseNBT()
to allow creation of base NBT needed to spawn an entity without boilerplate CompoundTags everywhere. - Added API method
Living->lookAt()
to make a mob turn and look at a certain position. Entity->spawnTo()
should no longer be overridden for sending packets for spawning entities to players; overrideEntity->sendSpawnPacket()
instead.- Setting villager profession now shows the correct profession on the client side.
Villager::PROFESSION_GENERIC
has been removed since it does not exist in vanilla and crashes players if used.- A range of API methods have been added to allow controlling entity oxygen supply (2601e35)
Events
- Removed
PlayerMoveEvent->setFrom()
. - Added
PlayerChangeSkinEvent
Inventory
- Added
BaseInventory->removeAllViewers()
andBaseInventory->dropContents()
.
Level
- FloatingTextParticle now uses a transparent skin so that the tiny player cannot be seen.
- Explosions now correctly remove tiles.
NBT
- A range of new methods have been added to
CompoundTag
's API to allow more sane handling of the data they contain. See #1469 for details. tagType
parameter has been added toListTag
's constructor.
Item
Durable
class has been added to abstract damage handling away from tools directly.Enchantment::registerEnchantment()
method has been added.- Items with out-of-bounds damage values will no longer crash the server.
- Serializing ItemBlocks which have previously been used to place blocks will no longer raise exceptions
Item->getNamedTag()
will now return an emptyCompoundTag
if the item does not have any NBT; this change was made after seeing that this function is only ever used when wanting to alter the item's NBT.- Added API methods
Item->setNamedTagEntry()
andItem->removeNamedTagEntry()
- Added some constants for commonly-accessed item NBT tags.
- Some unnecessary/obsolete item classes have been removed.
Player
- Added
Player->getXuid()
- note that this will ONLY return a valid XUID for players logged into Xbox Live - Changed stupid default values for
Player->setAllowMovementCheats()
andPlayer->setAllowInstaBreak()
Scheduler
- An ErrorException-throwing error handler is now set on AsyncWorkers. Due to a bug in PHP pthreads causing warnings not to get output, you may experience unexpected errors/crashes in AsyncTasks where previously everything appeared to work fine due to silenced warnings.
Utils
- Fixed
Binary::unsignShort()
mistakenly being non-static
Gameplay
General
- Arrows will now fly through smaller spaces as their bounding boxes have been corrected.
- Arrows can no longer be shot through the top part of a stair.
- Fixed getting kicked for flight when walking on top of fences, fence-gates and stairs.
- Fixed a range of bugs with entity movement and collision on fences, fence-gates, glass panes, iron bars,
doors and a wide variety of other blocks (collision checks on these now account for their correct shape instead of assuming a cuboid bounding box). These bugs occurred due to outdated bounding box caches when blocks' shapes updated. - Movement anti-cheat is now disabled by default on new installations.
- Oxygen supply is no longer used when the player is underwater in creative or spectator modes.
- Players will no longer take damage on respawn when they were killed while falling from causes other than fall damage.
- Peaceful difficulty no longer disables player-versus-player combat.
- Skins with custom capes and geometry models are now supported.
Blocks
- Added the following:
- concrete powder
- red sandstone, red sandstone stairs and red sandstone slabs
- purpur, purpur stairs and purpur slabs
- end stone bricks
- Beds no longer leave their other halves behind invisible when broken in survival mode.
- Buttons now have the correct rotation when placed.
- Dead bush now drops 0-2 sticks instead of itself.
- Falling blocks will now fall when placed above fire.
- Falling blocks landing in water will no longer overwrite wrong blocks when moved slightly by currents.
- Farmland will now hydrate when <= 4 blocks from water (crops don't take notice of this yet)
- Farmland and grass path will now turn to dirt if a solid block is placed on top of them.
- Mob heads no longer rotate 45 degrees sideways when placed facing north
- Slab placement in half-block gaps should now (finally!) work correctly.
Crafting
- Shift-clicking on the recipe book to batch-craft items now works correctly.
- Crafting using mirrored asymmetric shaped recipes now works correctly.
Entities
- Mob death animations now last the correct length of time.
- Dropped items are now destroyed by lava.
Items
- Flint and steel will now play a sound when a fire is created.
- Hoes and shovels now break when their damage exceeds their durability (although still take double damage).
- Implemented writable and written books (#1397)
PocketMine-MP 1.7dev-83 with API 3.0.0-ALPHA8
For Minecraft: Bedrock Edition 1.2.0.81
Rewritten inventory transaction handling, (mostly) fixed desktop crafting, implemented Xbox Live authentication
This version is an alpha snapshot, is NOT FEATURE COMPLETE and may be unstable. Please use our issue tracker to report bugs.
Please do not create issues for missing gameplay features.
This build has breaking API changes, so the API has been bumped to 3.0.0-ALPHA8. These changes are NOT yet complete.
Notable changes
Core
- Composer is now required to run a server from source-code.
- Xbox Live authentication has been implemented and is enabled by default.
- The server no longer crashes when loading an old world containing furnaces with missing NBT tags.
- Stats reporting can now be disabled from the command-line using
--anonymous-statistics.enabled=0
- Players with spaces in their names are now accepted on the server.
- Following from the above, commands now support quoted arguments, so if you want to kick player
Rotten Eggs
, use quotes, like so:/kick "Rotten Eggs" reason why
- Following from the above, commands now support quoted arguments, so if you want to kick player
API
Block
- Added API method
BlockFactory::isRegistered()
Events
- Added
PlayerBlockPickEvent
- API method
CraftItemEvent->getTransaction()
has been added and returns aCraftingTransaction
object. InventoryTransactionEvent->getTransaction()
now returns anInventoryTransaction
instead of aTransactionGroup
Inventory
The inventory transaction system has been almost completely rewritten, the following things have changed:
-
The general naming of TransactionGroups and Transactions has been refactored to Transaction and InventoryAction respectively as the original naming did not make sense.
-
Removed
SimpleTransactionGroup
,TransactionGroup
,BaseTransaction
,Transaction
andSlotType
classes -
Added the following:
InventoryTransaction
- used for regular inventory transactions, this replaces the old SimpleTransactionGroup in terms of functionalityCraftingTransaction
- represents anInventoryTransaction
in which the actions are to create a crafted item.InventoryAction
- base class which represents a change in the amount of an item, somewhere. This has several subclasses:SlotChangeAction
: Represents a change of the amount of an item in a specific slot of an inventory. This replaces the functionality of the oldBaseTransaction
.DropItemAction
: Represents a player throwing an item onto the ground out of their inventory.CreativeInventoryAction
: Represents the action of creating or deleting items using the creative menu.CraftingTransferMaterialAction
: Represents the action of consuming a crafting ingredient, or getting a secondary output from a crafting event (don't try too hard to understand this)CraftingTakeResultAction
: Represents a player taking the primary result item from the crafting grid result slot.
-
CraftingGrid
andBigCraftingGrid
have been added. Note for plugin developers: if you change the contents of these, players will not see the changes, due to a limitation in the current 1.2 client. -
PlayerCursorInventory
has been added - this is a container representing the item under the cursor on desktop platforms. Note that sending this inventory's contents does not work correctly due to a bug in the current 1.2 client. -
InventoryType
has been removed -
API methods
BaseInventory->getDefaultTitle()
,BaseInventory->getDefaultSize()
andContainerInventory->getNetworkType()
have been added. -
Due to changes in the 1.2 client, the API for changing hotbar linked slots has been removed - they now behave the same way as Minecraft PC Edition does. The following obsolete API methods have been removed:
PlayerInventory->resetHotbar()
PlayerInventory->getHotbarSlotIndex()
PlayerInventory->setHotbarSlotIndex()
PlayerInventory->setHeldItemSlot()
-
BaseInventory->getItem()
andBaseInventory->setItem()
will now throw an exception if an out-of-bounds inventory slot index is given. -
ShapedRecipe
's constructor has been changed, it now acceptsItem $result, string[] $shape, Item[] $shapeItems, Item[] $extraResults
. -
Removed
BigShapedRecipe
andBigShapelessRecipe
- these have been obsoleted by the addition ofCraftingRecipe->requiresCraftingTable()
-
Added
send
parameters toBaseInventory->clear()
,BaseInventory->setItem()
.
Item
- Added API method
Item->isNull()
, which returns true if the count of the item is less than or equal to 0, or if its ID is air. - Added API method
Item->equalsExact()
which asserts that the ID, count, damage and NBT must all be identical. - Added API method
ItemFactory::isRegistered()
Level
- The server no longer crashes if a plugin uses
Level->unload()
directly. Note that you should not be using this anyway!!! UseServer->unloadLevel()
instead.
Plugins
- Refactored API checking code into its own function (
PluginManager->isCompatibleApi(string ...$apiVersions)
)
Scheduler & AsyncTasks
- Added API method
AsyncTask->storeLocal()
, which must be explictly called to store objects in the scheduler object store. This replaces the functionality ofAsyncTask->__construct()
because the old behaviour was too easy to use by accident. See #1322 for details.
Gameplay
- Implemented Coarse Dirt
- Eating sounds now work correctly.
- Reverted botched fix for #145 that caused problems with double slabs.
- Desktop crafting now works (except for a crash when using the recipe book - WIP)
PocketMine-MP 1.7dev-27 with API 3.0.0-ALPHA7
For Minecraft PE 1.1.0.55
Minor bugfixes, updated for PHP 7.2
This version is an alpha snapshot and is NOT FEATURE COMPLETE. Please use our issue tracker to report bugs. Please do not create issues for missing gameplay features.
This build does not have any notable API changes, existing plugins declaring compatibility with API 3.0.0-ALPHA7 should be compatible.
The minor version has been updated to reflect the move to PHP 7.2.
NOTE: This version REQUIRES a minimum version of PHP 7.2.
Notable changes
Core
- Minimum PHP version requirement is now PHP 7.2. This is because of thread-safety issues in earlier versions which make PHP 7.0 & 7.1 unsafe. 7.2, while (at the time of writing) is still in RC, is far more stable.
- Fixed not being able to find sources when PocketMine.php is run from anywhere other than 3 levels up
- The server will no longer crash if a garbage value is set as the timezone in php.ini.
- Exception stack traces are now always logged regardless of debug level. Note that this ONLY affects stack traces, the usual debug level applies for everything else.
Non-packaged PocketMine-MP installation
is now more informative about the advantages of using a phar in production.
Network
- Fixed #1358 - resource packs reporting incorrect sizes in preprocessed Jenkins builds
PocketMine-MP 1.6.2dev-562 "Unleashed" with API 3.0.0-ALPHA7
For Minecraft PE 1.1.0.55
Many breaking API changes for type safety, major entity performance improvements, custom blocks & items
DISCLAIMER: This is an ALPHA snapshot. This version is NOT FEATURE COMPLETE and may be unstable. PMMP is not responsible for nuclear war, explosions or loss of data resulting from use of this build. Please use our issue tracker to report bugs.
This build has breaking API changes, so the API has been bumped to 3.0.0-ALPHA7. These changes are NOT yet complete.
NOTE: This will be the last big release to support PHP 7.0.
Notable changes
Core
- Backtraces no longer incorrectly show a
boolean
parameter when a function call in the stack trace had no parameters. - Configs will now save correctly when the type was auto-detected due to being unspecified.
- Fixed RakLibInterface crashing when exceptions are raised during packet handling, after the player was closed.
- Fixed UUIDs becoming corrupted when converted to strings
- Fixed crashes caused by NBT TAG_Short being written as signed but read as unsigned.
- Plugin load error messages such as "incompatible API version" and "Unknown dependency" are now more verbose
- Significant performance enhancements to entity ticking and to explosions
- The server will no longer crash when players join if the spawn radius is set to 0.
API
The big breaking changes
A large number of API methods and interfaces have prototype changes - addition of scalar typehints throughout the code. The most breaking of these for plugins are the following:
CommandExecutor->onCommand()
:- before:
onCommand(CommandSender $sender, Command $command, $label, $args)
- after:
onCommand(CommandSender $sender, Command $command, string $label, $args) : bool
- before:
Task->onRun()
:- before:
onRun($currentTick)
- after:
onRun(int $currentTick)
- before:
Plugins implementing these methods will require the implementing methods' signatures changing to comply with the core code.
NOTE THAT THESE CHANGES ARE NOT FINAL. PHP 7.2 will add void
and nullable return typehints which will also be made use of when we move to PHP 7.2.
Other changes
Commands
- Added
InvalidCommandSyntaxException
. Throwing this exception in a Command's execution function will cause its usage to be displayed. This is used to reduce repeated code in the built-in commands and has not been tested from aCommandExecutor
perspective (yet).
Block
- Plugins can now register their own custom blocks and/or override existing implementations. Refer to
BlockFactory
for documentation. - Block ID constants are now generated automatically from vanilla. In the mix, many old aliases which didn't make sense have been removed.
- Several Block classes have been removed due to excess duplication. Blocks are now instantiated by creating clones of pre-initialized objects registered in BlockFactory.
Block->canBeActivated()
andItem->canBeActivated()
have been removed due to extra confusion they caused in the implementation of new gameplay features.Block->getDrops()
now returnsItem[]
instead ofint[][]
. Plugins which use this method will need alterations.Block::get()
now redirects toBlockFactory::get()
. This is backwards compatible with existing implementations.Block::get()
will now throw exceptions when out-of-bounds block IDs or block meta values are given.new Block()
should now only be used for constructing block types.Block::get()
orBlockFactory::get()
should be used instead for getting block instances to set into the world.Block->getResistance()
has been deprecated, superseded byBlock->getBlastResistance()
.- Added API method
Block->ticksRandomly() : bool
(used for level random block ticking registration, see below)
Entity
- Obsolete first parameters have been removed from
Entity->attack()
andEntity->heal()
. Entity->getHealth()
now returns a float, andEntity->setHealth()
now accepts floats.- Redundant public property
Entity->length
has been removed. Entity->closed
is now protected, useEntity->isClosed()
instead. (eebc52e)
Events
- Added the following events:
- NetworkInterfaceCrashEvent
- NetworkInterfaceRegisterEvent
- NetworkInterfaceUnregisterEvent
- PlayerJumpEvent
- Fixed
EntityEatBlockEvent
not being called when a player eats a slice of cake - Fixed
PlayerBucketEmptyEvent
not being used anywhere
Item
- Plugins can now register their own custom items and/or override existing implementations. Refer to
ItemFactory
for documentation. - Item ID constants are now generated automatically from vanilla. In the mix, many old aliases which didn't make sense have been removed.
- Added API methods
Item->hasEnchantment(int, int) : bool
,Item->removeEnchantment(int, int)
,Item->removeEnchantments()
- Added API methods
Item->getAttackPoints() : int
andItem->getDefensePoints() : int
- Many redundant item classes have been removed due to excess duplication. Items are now instantiated by creating clones of pre-initialized objects registered in
ItemFactory
. Item->clearCustomBlockData()
now works correctly.new Item()
should now only be used for constructing item types.Item::get()
orItemFactory::get()
should be used instead for getting item instances to set into an inventory.Item::get()
andItem::fromString()
now redirect to their respective methods inItemFactory
. This is backwards compatible with existing implementations.- The
count
parameter has been removed fromItem::__construct()
. - Fixed issues with serialize/deserialize items from NBT where the tag kept the wrong name
Level
Level->dropItem()
now returns a reference to the created item entity.Nether
generator no longer returnsnormal
ingetName()
.
Math
- Added precision and rounding mode arguments to
Vector3->round()
. This defaults to the original behaviour if the arguments are not specified. Position->equals()
andLocation->equals()
will now additionally check level (if the parameter is an instance of Position) and yaw/pitch (if the parameter is an instance of Location) respectively. (b8a3030)
Network
- MCPE packets are now registered in
pocketmine\network\mcpe\protocol\PacketPool
. API methodsregisterPacket()
andgetPacket()
have been removed fromNetwork
. This is to allow easier auto-generation of protocol-related code. - Added
PlayerNetworkSessionAdapter
. This is currently used to reduce the amount of empty handlers inPlayer
, however this may cause problems which override handlers inPlayer
to handle packets. Plugins which overridePlayer->handleDataPacket()
should still work correctly, provided that you remember to call the parent.
The developers are aware that this is an API problem and this will be resolved in a future update. Please remember that the network refactor is not finished and don't kill the developers. Packet->decode()
andPacket->encode()
should no longer be overridden by plugins as core functionality is performed in here. UsePacket->decodePayload()
andPacket->encodePayload()
when creating new packets.
Plugin handling
- Plugins can now specify the
mcpe-protocol
attribute in plugin.yml to specify compatible protocol versions. - Specifying API as
2.0
when the server API is2.0.0
or similar is now legal and will work correctly. - Fixed plugins with unknown dependencies claiming to have circular dependencies.
Tasks
- The
MainLogger
is now accessible in AsyncTasks by use ofMainLogger::getLogger()
. - Throwing exceptions during
Task->onCancel()
will no longer cause server crashes and undesirable behaviour. ServerScheduler->scheduleAsyncTask()
now returns the ID of the worker the task was scheduled to.
Tile
- Added some methods to
tile\Sign
andSignChangeEvent
for consistency. (42fb1d1) Sign->setText()
now accepts null parameters to leave the text on those lines as-is.Spawnable->getSpawnCompound()
is now final. Plugins implementing custom tiles should instead overrideSpawnable->addAdditionalSpawnData()
. See #1259 for changes and examples.
Gameplay
Blocks
- Implemented: bone block, coloured beds, concrete, double plants, end rod, glazed terracotta, magma, nether wart, nether wart block, red nether brick, stained glass
- Beds can no longer be slept in beyond a 2-block distance.
- Fixed beds not requiring a solid block under the head
- Fixed bookshelves dropping themselves instead of 3 books
- Fixed quartz pillar rotation not working correctly
- Grass growth and death now works correctly.
- Lit redstone lamp block now emits the correct amount of light.
- Obsidian can no longer be destroyed by TNT
- Placing rails is now less weird (they still won't join up though yet).
- Re-added Nether Reactor core (decorative only, as in vanilla)
Commands
- Command usage messages are now translated server-side to resolve client-side translation issues.
Entities
- Armor will now correctly absorb damage when the resulting damage from an attack is less than 1 point.
- Fixed mobs such as zombies and villagers not having their positions updated server-side when something causes them to gain motion. This fixes problems with floating mobs and zombies being unkillable in earlier versions. As an added bonus, the change fixing this problem brought in substantial performance improvements. See 2f3c77c and c32b75f for details.
- Fixed cake not applying any food/saturation to the eater
- Absorption and damage resistance now absorb the correct amount of damage when armor is worn.
Inventory
- Several furnace fuel items which did not work before now...
PocketMine-MP 1.6.2dev-229 "Unleashed" with API 3.0.0-ALPHA6
For Minecraft PE 1.1.0.55
Beginning of strict types, some performance improvements, lots of bug fixes.
DISCLAIMER: THIS IS AN ALPHA SNAPSHOT. THIS BUILD IS NOT FEATURE-COMPLETE AND IS LIKELY TO BE HIGHLY UNSTABLE. WE ARE NOT RESPONSIBLE FOR NUCLEAR WAR, EXPLOSIONS OR CORRUPTION OF DATA RESULTING FROM USE OF THIS BUILD.
This build has breaking API changes, so the API has been bumped to 3.0.0-ALPHA6. These changes are NOT yet complete.
Notable changes
Core
- 32-bit support has been removed for consistency and performance reasons. (#984)
- The
Binary
class now has strict types and type-hinting for safety reasons when writing data to network. - Fixed incorrect PC world format versions causing Mojang's official McRegion -> Anvil converter to reject PocketMine-MP-generated McRegion worlds.
- Fixed ServerKiller does not work correctly on single-core machines.
- AsyncTasks no longer leak memory after completion. (#922)
- Fixed masses of console spam when a crash occurs and an NBT tag or EncapsulatedPacket was an argument somewhere in the call stack.
- NBT ListTags now default to TAG_End if no tag type is specified instead of null.
- Fixed /particle command crash when creating TerrainParticle or ItemBreakParticle
- Player
XpSeed
is now restricted to the bounds of an int32 on all platform (since it is supposed to be saved as an IntTag, which is bounded to the range of an int32). - Player->close() now does its best to catch thrown exceptions and clean up after itself to avoid possible leaks and issues during the quit process.
- Fixed AutoUpdater crashing the server when invalid data is returned by the updater host.
- Changed updater host to https://update.pmmp.io
- Changed crash-archive host to https://crash.pmmp.io
- Fixed some issues with static properties not being included in memory dumps.
- Fixed server crashing when crashing while creating a CrashDump.
- Fixed silenced errors being reported in CrashDumps when a plugin uses
exit()
ordie()
. - Fixed lots of bugs exposed by strict types.
Network
- Chunk serialization and compression is now always done asynchronously to improve performance.
- Level area-broadcasted packets and block updates are now sent in batches instead of individual packets to improve performance.
- Workaround for packets sent with immediate priority being ignored by the client (#1026)
- Fixed UUID encoding (players will no longer see themselves twice in the player list)
- ResourcePackDataInfoPacket will now report the correct number of resource pack chunks.
Gameplay
- Dropped items no longer bounce on partial blocks such as slabs.
- Fixed hunger decreasing too fast.
- Fixed server crash when vines are placed on some block faces.
- Falling sand is no longer destroyed by grass and no longer destroys slabs.
- Falling into water 1 block deep no longer causes fall damage.
- Removed eye-height offsets causing spawned entities to appear in wrong positions on the client-side.
- Arrows will now fly correctly towards targets and no longer spin round and fall flat when hitting a surface.
- Implemented basic sky-light population on chunk generation and sky-light updating when blocks are changed in the world. This will be needed for proper farming.
- Improved player movement (smoother, much less stuttery) and fixed several client-sided positioning bugs.
- Fixed other players don't see teleport movement when teleporting to nearby locations.
- Fixed player spawn points set using /spawnpoint not working.
API
- Strict types are now enabled throughout the core code. See #969 and #993 for details.
- Plugins can now specify the
extensions
attribute in plugin.yml to specify PHP extensions required for the plugin to function correctly. This may be useful where plugins require extensions which are not supplied by default with PMMP-supplied PHP binaries. (#903) - Added
Vector3->asVector3()
,Position->asPosition()
,Location->asLocation()
(#973). This is intended to provide an easy way to convert a descendent of one of these classes (such as anEntity
) into an explicit Vector3, Position or Location. - Added the following events:
- PlayerDataSaveEvent, which is called when a player's NBT data is about to be saved to disk. (#920)
- UpdateNotifyEvent, which is called when the AutoUpdater receives information that a new PocketMine-MP version is available.
- PlayerInteractEvent is now called with the left-click action when a player attempts to remove an item from an item frame.
- NBT classes now have more strict type-checking in the constructors,
Tag->getValue()
andTag->setValue()
. ByteTags, ShortTags and IntTags will now throw an exception if the supplied value is outside of the range they can store. - Block constructors will now always retain the meta values passed in the constructor, fixes issues with crafting with recipes that required any-damage ingredients.
- Added API methods
Block->canClimb()
,Entity->canClimb()
,Entity->setCanClimb(bool)
,Entity->canClimbWalls()
andEntity->setCanClimbWalls(bool)
along with corresponding entity metadata flags. - Added API methods
Block->getLightFilter()
andBlock->diffusesSkyLight()
(used in sky light population). - Added
/title
command and API for resetting title durations. - Refactored some JSON-parsing-specific NBT code into its own class.
- Added
Server->broadcastTitle()
. Item->setLore()
is now fluent.
PocketMine-MP 1.6.2dev-57 "Unleashed" with API 3.0.0-ALPHA5
For Minecraft PE 1.0.7.0
Many bug fixes, changes to network API (work still in progress!), improved chunk sending, added resource packs support
DISCLAIMER: THIS IS AN ALPHA SNAPSHOT. THIS BUILD IS NOT FEATURE-COMPLETE AND IS LIKELY TO BE HIGHLY UNSTABLE. WE ARE NOT RESPONSIBLE FOR NUCLEAR WAR, EXPLOSIONS OR CORRUPTION OF DATA RESULTING FROM USE OF THIS BUILD.
This build has breaking API changes, so the API has been bumped to 3.0.0-ALPHA5. These changes are NOT yet complete.
Notable changes
Core
- World format implementations using Regions will now be more thoroughly checked for validity before the core attempts to use them. (#393)
- Fixed a crash that would prevent a world from being at all usable if a Human was created with an invalid skin.
- Fixed chunk object memory leak when chunks are replaced by the generator.
- Tile and Entity NBT trees are now destroyed when their close() methods are called to combat memory leaks.
- Fixed tile and entity object memory leaks and crashes when replacing chunks
- Chunk->addTile(Tile) and Chunk->addEntity(Entity) will now throw exceptions if something attempts to add a closed tile or entity to them.
- Fixed squid health attribute errors
- Fixed server crash when taking damage after dying when the Health Boost effect was applied before death.
- Fixed crashes when using xdebug and breaking very tall cacti or sugarcane (recursive block updates)
- Fixed some packets being sent with reliability level 0, may improve connections randomly being dropped
- Fixed memory leak related to persistent entities when lots of players join and quit a server in the same area
- Fixed possible item NBT duplication where items were holding references to the same NBT trees when cloned.
- Fixed usage always being reported even when disabled in pocketmine.yml
- Fixed stack traces in the logger sometimes missing the top stack frame.
- Fixed Entity object memory leak in EntityDamageByEntityEvent
- Fixed Player object memory leak when players subscribed to the administrative broadcast permission quit the server
- Non-generated chunks will no longer be saved to disk, fixes big dirty holes in some maps due to chunks being saved before being generated
- Rewritten the chunk sending algorithm, much better chunk sending (will now actually reach the horizon)
- Fixed a major memory leak when a W10 player set a very high render distance due to the server not enforcing radius limits. This has been corrected,. A player's render distance will now be set to the minimum of the spawn radius, the player's radius, or the server default render distance.
- The settings
chunk-sending.max-chunks
has been removed from pocketmine.yml in favour of a more vanillaview-distance
setting in server.properties (values match MCPE render distance settings) andchunk-sending.spawn-threshold
has been replaced withchunk-sending.spawn-radius
(again, same values as MCPE). - Fixed CPU waste of batched packets sometimes being encoded twice.
- Auto-updater checks are now done with an AsyncTask to prevent slowdown on server start.
- Added debug output for lots of network- and protocol-related things.
API
- Massive refactor of the network namespace. All packets have moved from network\protocol to network\mcpe\protocol, and Info has been renamed to ProtocolInfo. This is to make space for future changes. Note that these changes are far from complete and more will follow.
- Added API methods to Player to allow transferring them to other servers, and to allow sending titles.
- Added Entity API for setting entity scale.
- Added support for commands with spaces in their names for future command implementation.
- Item->deepEquals() has been deprecated and its functionality added to Item->equals().
- Added the Color class to the utils namespace. This was primarily added for use when reversing the encoding of the ClientboundMapItemDataPacket.
- Player->hasPermission() will now throw an exception if the player has been closed.
- Commands no longer all have the same hints if you modify one command's data.
- API methods Player::isValidSkin() and Player::isValidName() have been added.
- The API for Utils internet access has been improved, added BulkCurlTask for batch-executing cURL operations. See #834 for details.
Gameplay
- Fixed sounds not working after 1.0.4
- Added resource packs support. This support is currently very basic and will be improved in the future. Currently only resource packs in the .zip format are supported. See the resource packs configuration for details (will be created in the resource_packs/ directory after you run the server).
- Hunger now works!
- Implemented Absorption effect
- Fixed bows can't be fired after starting or stopping sprint.
- Fixed solid blocks filtering their own light, fixes light saving for lit furnace, pumpkins and glowing obsidian.
- Fixed unlit furnaces glowing in the dark.
- Fixed lighting issues due to light changes in subchunks which were not being saved to disk.
- Block light is now correctly updated when removing obstructions.
- Fixed potion bubbles not working.
- Added support for copying tile NBT onto items by ctrl+middle-clicking on Windows 10 Edition.
- Fixed blocks sometimes glitching and reappearing when broken due to timing issues.
- Fixed slowness being removed when trying to sprint
- Fixed lots of issues with the hotbar, armor equipment and item equipment in creative (and caused some creative transaction bugs)
- Fixed Cake recipe not showing up due to having multiple result items
- Fence-gates now work properly
- Spectator-mode players cannot break blocks anymore if the AdventureSettings flags were not set correctly.
- Fixed some issues with entity spawn rotation due to a silly mistake in AddEntityPacket.
PocketMine-MP 1.6.2dev "Unleashed" with API 3.0.0-ALPHA4
For Minecraft PE 1.0.3.0
Many bug fixes, changes to Chunk, Tile and Entity API, improved language system
DISCLAIMER: THIS IS AN ALPHA SNAPSHOT. THIS BUILD IS NOT FEATURE-COMPLETE AND IS LIKELY TO BE HIGHLY UNSTABLE. WE ARE NOT RESPONSIBLE FOR NUCLEAR WAR, EXPLOSIONS OR CORRUPTION OF DATA RESULTING FROM USE OF THIS BUILD.
This build has breaking API changes, so the API has been bumped to 3.0.0-ALPHA4. These changes are NOT yet complete.
Notable changes
Core
- Removed SQLite3 hard dependency as it is no longer used by the core code.
- Translation system has been reworked for better synchronization and consistency. Please head over to http://translate.pocketmine.net if you would like to help.
Gameplay
- Enchanted Golden Apples now give the eater Absorption 4
API
- Removed chunk/provider/level/tile/entity entanglement. This is a very breaking change, see c21197e for details.
- Removed some sound classes
- Removed deprecated version constants from PocketMine.php
- Added UnknownBlock class
- Added some API methods for changing entity scale (6dc6e32)
Fixes
- Fixed a CPU leak that occurred when movement checks were disabled (this was the same underlying issue causing
player moved too fast, reverting movement
) (ccef045) - Fixed a CrashDump bug causing all crashdumps to report an issue creating the crashdump directory (09a6776)
- Fixed incorrect git commit hash parsing when running a server from source code (#299)
- Fixed some issues with command sending
- Fixed Sea Lantern lighting issues
- Fixed half-trees in freshly-generated worlds
- Fixed DestroyBlockParticle
- Fixed some issues with removing items from item frames
- Fixed movement-checking bugs due to bad anti-spam check in MovePlayerPacket handler
- Fixed lots of improperly-implemented blocks causing suffocation
- Fixed issues breaking some improperly-implemented blocks
- Fixed heightmap-related crashes in McRegion worlds
PocketMine-MP 1.6.2dev "Unleashed" with API 3.0.0-ALPHA3
For Minecraft PE 1.0.0.16
API changes relating to closing Levels and anti-cheat, along with many bug fixes.
DISCLAIMER: THIS IS AN ALPHA SNAPSHOT. THIS BUILD IS NOT FEATURE-COMPLETE AND IS LIKELY TO BE HIGHLY UNSTABLE. WE ARE NOT RESPONSIBLE FOR NUCLEAR WAR, EXPLOSIONS OR CORRUPTION OF DATA RESULTING FROM USE OF THIS BUILD.
This build has breaking API changes, so the API has been bumped to 3.0.0-ALPHA3. These changes are NOT yet complete.
Changes
Core
- Added a hack to workaround client-side text duplication (TODO REVERT 52748fc)
- Crashdumps are now created in the
crashdumps
folder instead of being dumped into your server root directory. - Some tweaks for Anvil I/O for more performance in some circumstances (won't make much difference in heavily-built up worlds)
- Movement-checks and instabreak anti-cheats can now be disabled in pocketmine.yml (#287)
- EXPERIMENTAL LevelDB support is back, with support for MCPE 1.0 worlds. NOTE that LevelDB can be HIGHLY UNSTABLE and will segfault a lot. See #254 for progress.
- Added crafting data cache to reduce on-join lag spikes. (9c36e0c)
- Assertion behaviour is now configurable: the server will by default warn on startup if assertions are enabled, and assertion exception throws are now disabled by default. This can be configured under the
debug
section in pocketmine.yml.
API
- API version suffix for plugins is now non-case-sensitive.
- Type-hints have been added to Item::get() and some Item API methods. This is in an effort to combat some peculiar issues which arose from using null or wrong types.
- Added API to allow customising randomly-ticked blocks in Level.
- Added method
Level->isClosed()
to allow checking if a Level is still usable before trying to do stuff with it. Position->getLevel()
will now verify that the Level is usable before returning it, and if it is not will destroy the reference and return null. This is to help identify leaks with unloaded Levels.- Added API methods to allow controlling anti-cheat configuration per-player (#287) and added PlayerIllegalMoveEvent to allow plugins to cancel movement anti-cheat positives.
- Removed deprecated
Utils::getRandomBytes()
(use php7 random_bytes() instead) (085d1a1) - Moved LevelException, PluginException and ChunkException into more relevant namespaces (946d301)
Fixes
- Fixed CommandReader hanging on shutdown on Windows (#171)
- Fixed vanilla McRegion worlds getting corrupted (8902992)
- Fixed total server freeze when teleporting long distances
- Fixed anti-cheat false-positives when climbing ladders and a wide variety of other movement issues (8ea0352)
- Fixed shutdown memory leaks related to double chests (e4aa3d7)
- Fixed eating golden apples with full hunger
- Fixed long-string NBT encoding (longer than 127 bytes, length is a uvarint not a byte), fixed corrupted sign issues, fixed issues with unicode sign text
- Fixed players appearing under the world when sleeping.
- Fixed players continuing to burn in creative mode.
- Fixed players sometimes not dying properly after taking lethal damage due to food regeneration (441961b)
- Fixed a logic error in the basic generator preventing swamp biomes from generating (b566c4e)
- Fixed setting item custom name doesn't update player (0584681)
- Fixed bad lighting issues when importing a PocketMine-MP world back to vanilla Minecraft (946d301)
PocketMine-MP 1.6.2dev "Unleashed" with API 3.0.0-ALPHA2
For Minecraft PE 1.0.0.16
Less surface changes, better performance, large changes to Level IO
DISCLAIMER: THIS IS AN ALPHA SNAPSHOT. THIS BUILD IS NOT FEATURE-COMPLETE AND IS LIKELY TO BE HIGHLY UNSTABLE. WE ARE NOT RESPONSIBLE FOR NUCLEAR WAR, EXPLOSIONS OR CORRUPTION OF DATA RESULTING FROM USE OF THIS BUILD.
This build has breaking API changes, so the API has been bumped to 3.0.0-ALPHA2. These changes are NOT yet complete.
Changes
Core
- Re-added support for async network chunk serialization
- Refactored level\format namespace (see files for changes)
- Added new world format PMAnvil (based on Anvil with some alterations)
Gameplay
- Added Item Frames
- Added some 0.16 blocks and items.
- Updated creative inventory and crafting recipes for 1.0.0.16
API
- Refactored Server::broadcastPacket() to be non-static, use available server references.
- Type declarations and strict types for most things in the level\format namespace.
- Refactor Level::chunkBlockHash() -> Chunk::chunkBlockHash()
- GenericChunk::fastSerialize() is no longer static.
- Refactored format\generic\GenericChunk -> format\Chunk. You should already have been using the format\Chunk interface, if not you may need to make alterations.
- Removed unused Entity stub classes in preparation for Entity API rewrite.
Fixes
- Fixed unable to teleport over Y = 128
- Fix some mob head rotation bugs
- Fixed some issues with Flower Pot items vanishing and not saving correctly
- Fixed Win10 Edition default hotbar mapping
- Fixed issues crafting with items with NBT (5443b10, 77b3cd7)
- Fixed a crash in Item->deepEquals() where only one item had a tag
- Fixed issues with the title bar and /status reporting incorrect CPU and tick usage statistics (8bdfe0d)
- Fixed an age-old corruption bug due to use of IntTag for Time in PC worlds (3dcfa7b)
- Fixed negative effect amplifier crash (#191)
- Fixed some bugs with some blocks having to be broken twice (obsidian, netherrack) (wrong hardness values)
- Fixed Head drops
- Fixed dropped items disappearing after a server restart