74 KiB
3.0.0-ALPHA1
For Minecraft PE 1.0.0.16 Initial snapshot of MCPE 1.0 changes.
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-ALPHA1. These changes are NOT yet complete.
Core
- New generic in-memory chunk format for universal chunk handling and future conversion implementation.
Gameplay
- Supported 256-height worlds
- Standard chunk interface changed from FullChunk to Chunk (see above)
API
- Removed biome color support and all related biome color API methods (no longer supported by MCPE client)
Fixes
- Fixed Win10 throws away their held item when the inventory is closed (
3b3abab3ad
) - Fixed MobHead bounding box and properties (
c79077cbed
) - Fixed server ignoring head rotation (
fa5624f87e
) - Fixed gamemode switching to adventure/spectator for op players (
43a36dba40
) - Fixed clicking on fire to extinguish it (#132)
- Fixed players always respawning at the server spawn when the folder name is different to the world name (#150)
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.
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
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.
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
)
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.
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
c21197ef17
for details. - Removed some sound classes
- Removed deprecated version constants from PocketMine.php
- Added UnknownBlock class
- Added some API methods for changing entity scale (
6dc6e32656
)
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
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.
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.
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.
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.
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.
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. (eebc52e00b
)
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. (b8a30309bb
)
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. (42fb1d1fef
) 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
2f3c77c68a
andc32b75fa18
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 work correctly.
- Armor screen on PE will no longer duplicate armor items when equipping armor.
World
- Fixed level random block ticking not being random anymore on the third iteration
- The presence of a spectator player will no longer prevent building at a target.
- Players will no longer take decades to spawn when the server is generating a new world. This was caused by a bug in chunk requesting causing the server not to fully utilize the CPU, which significantly delayed chunk generation before spawn.
3.0.0-ALPHA7 build 27
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
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.
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)
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.
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 (
2601e35990
)
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)
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.
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.
3.0.0-ALPHA10 build 516
For Minecraft: Bedrock Edition 1.2.7
This release is a support patch for Minecraft: Bedrock Edition v1.2.7 (protocol version 160). It has no breaking changes over the previous ALPHA10 release (1.7dev-501).
3.0.0-ALPHA11
For Minecraft: Bedrock Edition 1.2.7, 1.2.8, 1.2.9 New gameplay features, level I/O handling refactor, NBT refactor, changes to enchantments
This version is an alpha - it is not feature complete. Please do not create issues for missing gameplay features.
This build has breaking API changes, so the API has been bumped to version 3.0.0-ALPHA11.
Please use our issue tracker to report bugs.
Core
General
- Fixed
__FILE__
and__LINE__
being interpreted as C++ macros on Jenkins builds. This did not cause any noticeable bugs, but was still undesirable. - The NBT library has been moved to its own Composer library, along with
pocketmine\utils\Binary
andpocketmine\utils\BinaryStream
. - Instabreak anti-cheat has been removed from the core code. A plugin implementing this can be found at https://github.com/pmmp/AntiInstaBreak
- Fixed a race condition causing log messages to not be written to
server.log
when the server crashes. - Fixed a crash when using /dumpmemory to dump AsyncWorker global variables.
- Fixed memory dumps not including core class static properties.
Blocks
- Fixed a crash when the right half of a double chest was destroyed while being viewed.
Commands
- Fixed
/teleport
crash when extra spaces are placed between arguments.
Entities
- Fixed a crash reading
CustomNameVisible
NBT tag from versions prior to API 3.0.0-ALPHA6.
Network
- Added configuration option
network.max-mtu-size
to allow restricting the maximum byte size of packets sent without being split up. This may be useful to mitigate connection problems.
Level
- Fixed ghost blocks bugs due to the block cache not getting cleared when chunks are replaced.
- Fixed Region-based worlds leaking file resources (region GC was broken).
- Entities are no longer close()d when changing levels. This fixes myriad bugs in plugins and finally properly resolves the age-old chunk unload memory leak without undesired behaviour.
- Players joining LevelDB worlds with folder names that don't match the world display name will now not spawn up at y=32767.
Resource packs
- Errors decoding pack manifests will now raise appropriate error messages instead of
TypeError
s.
API
Block
- Added API methods
Block->getDropsForCompatibleTool()
andBlock->getSilkTouchDrops()
. Block->canBeBrokenWith()
has been renamed toisCompatibleWithTool()
.
Enchantments
- Enchantments have been split into enchantment types (
Enchantment
) and enchantment instances (EnchantmentInstance
).EnchantmentInstance
s should now be used for applying enchantments to items. This change permits various optimizations, and allows separation of immutable type data (such as ID, max level, applicable items, etc) and mutable instance data (such as a specific enchantment's level on an item).
Entity
- XP API has undergone significant changes. Generic math-only XP logic functions have been moved to
ExperienceUtils
fromHuman
. - Added the following
Human
API methods:addXpLevels()
,subtractXpLevels()
,getCurrentTotalXp()
,setCurrentTotalXp()
,addXp()
,subtractXp()
,getLifetimeTotalXp()
andsetLifetimeTotalXp()
. - Added API methods
Entity->isInvisible()
andEntity->setInvisible()
. - Data-property handling has undergone significant changes, see #1876 for details.
- Added API method
Living->getArmorInventory()
Events
PlayerPreLoginEvent
is now called before whitelist and banlist checks are done. This fixes backwards incompatibilities with older plugins which broke after a previous update.- Cancelling
EntityEffectRemoveEvent
will now throw an exception if the effect's duration has expired. - Removed
EntityEatEvent
and subclasses. These events didn't make sense because of their hunger-centric nature, meaning that they only applied to Players regardless.
Inventory
- Added a
$send
parameter toInventory->clearAll()
- Added a
$includeEmpty
parameter toInventory->getContents()
- Removed
Inventory->getHolder()
. Inventories no longer require that you give them anInventoryHolder
. A holder is now optional to be implemented by subclasses and is not required to be anInventoryHolder
. - Armor handling has been removed from
PlayerInventory
and separated into its ownArmorInventory
class.- All armor-related methods have been removed from
PlayerInventory
ArmorInventory
now contains armor-specific logic. All living entities have an armor inventory.
- All armor-related methods have been removed from
- Fixed
Player->removeWindow()
breaking client-sided GUI.
Item
- Added API method
Item->getEnchantmentLevel()
, which returns the level of the enchantment on the item with the given ID, or 0 if it does not have the enchantment. - Removed
Item->getMaxDurability()
- this has been moved toDurable
where it belongs.
Level
- Added API method
Level->addGlobalPacket()
, which allows queuing a packet to be broadcasted to everyone in the level at the end of the tick, similar to howaddChunkPacket()
works. - Added API method
Level->dropExperience()
, which drops a given amount of XP as XP orbs into the world. LevelProvider
s are no longer dependent on Levels. This is a significant change because it makes it possible to constructLevelProvider
s on threads without aLevel
, which opens up future possibilities to do many cool things:- Super-simple world format conversion
- Asynchronous chunk I/O (DISCLAIMER: These things are NOT implemented yet, but are examples of things that COULD be done.)
- The
LevelProvider
interface has undergone significant changes. Unused or redundant methods have been stripped out, and the remaining methods have significant changes:loadChunk()
now directly returns aChunk
object read from disk.saveChunk()
now directly accepts aChunk
object instead of coordinates.__construct()
now only accepts astring $path
, theLevel
parameter has been removed.- The following methods have been obsoleted, and therefore removed:
getChunk()
,setChunk()
,saveChunks()
,unloadChunk()
,unloadChunks()
,isChunkLoaded()
,getLoadedChunks()
,isChunkGenerated()
,isChunkPopulated()
andgetLevel()
getServer()
method has been removed fromBaseLevelProvider
.
Math
- Added
Math::solveQuadratic()
- Fixed
Vector2
's coordinates magically incrementing whenceil()
is used repeatedly - Added
VoxelRayTrace
containing two generator functions, which allow iterating over blocks on a line between two points. - Removed Math module dependency on
Level
(AxisAlignedBB
depended onMovingObjectPosition
). - Added
RayTraceResult
, which contains data for AxisAlignedBB ray trace results.
NBT
- NBT read/write logic (streams) have been moved to
NBTStream
and its descendents. NBT
class is now abstract.- Removed
network
parameters and endianness fields from NBT stream handling. These are now encapsulated in separate implementations ofNBTStream
(BigEndianNBTStream
,LittleEndianNBTStream
,NetworkLittleEndianNBTStream
).
Permission
- Added
BanList->getEntry()
Resource packs
- Added API method
ResourcePackManager->getPath()
, which returns the path to the server's resource packs directory.
Utils
- The public constant
TextFormat::EOL
has been added. This should be used instead ofPHP_EOL
when preparing messages to send to players, sincePHP_EOL
is platform-dependent. - API method
TextFormat::colorize()
has been added (see #1837 for details). BlockIterator
has been removed in favour ofmath\VoxelRayTrace
.
Gameplay
Blocks
- Block break times will now display correctly when an incorrect or not good enough tool is used to break a block.
- Fixed beds dropping in creative (#1525)
- Fixed chest items getting rearranged when creating a double chest.
Effects
- Hunger effect now applies as expected with high amplifiers.
- Implemented the following effects: Saturation, Fatal Poison (used for parrots).
- Levitation effect no longer triggers anti-flight.
Entities
- Fixed all currently-known occurrences of blocks like fire burning mobs when they are not actually intersecting with the block.
- Armour is now useful for damage types other than PvP.
- Non-player entities can now wear armour (with the help of plugins).
Items
- Implemented Potion effects
- Implemented Chorus Fruit
- Added sounds for Buckets
- Buckets now show the correct liquid inside when used on still liquids
- Empty buckets now stack to 16
- Implemented the following enchantments: Respiration, Silk Touch, Efficiency, Unbreaking, Protection, Fire Protection, Blast Protection, Feather Falling, Projectile Protection.
Player
- Fixed players' knockback being messed up.
- Crafting grid contents is no longer dumped into the player's inventory after respawning.
- Fixed interaction anti-cheat false-positives when doing the following (see #983):
- Standing on the corner of a block and breaking it/placing it (player was further than 0.5 blocks from block centre directionally)
- Breaking/placing blocks "behind" self by looking down and using multi-touch mode with mining circle on mobile devices.
- Breaking blocks right at the end of the survival reach distance.
- Adventure mode no longer prevents interacting with blocks.
- Implemented experience and experience orbs.
3.0.0-ALPHA11 build 698
For Minecraft: Bedrock Edition 1.2.10
This release is a support patch for Minecraft: Bedrock Edition v1.2.10 (protocol version 201). It has no breaking changes over the previous ALPHA11 release (1.7dev-677).
3.0.0-ALPHA11 build 703
For Minecraft: Bedrock Edition 1.2.10
This release is a bugfix update. It has no breaking changes over the previous ALPHA11 release (1.7dev-698).
Fixes
- Fixed /timings paste not working since paste.ubuntu.com paste ID update.
3.0.0-ALPHA11 build 717
For Minecraft: Bedrock Edition 1.2.10
This release is a bugfix update. It has no breaking changes over the previous ALPHA11 release (1.7dev-703).
Fixes
- Fixed client-side performance issue/lag due to constant spam of empty batch packets (#2020)
3.0.0-ALPHA11 build 743
For Minecraft: Bedrock Edition 1.2.10
This release is a bugfix update. It has no breaking changes over the previous ALPHA11 release (1.7dev-717).
Fixes
- Fixed server freeze & performance problems due to XP orbs following players who are too far away (#2028)
3.0.0-ALPHA12
For Minecraft: Bedrock Edition 1.2.13 Event handler inheritance changes, crafting rewrite, gameplay additions, API changes. This version is an alpha - it is not feature complete. Please do not create issues for missing gameplay features.
This build has breaking API changes, so the API has been bumped to version 3.0.0-ALPHA12.
Please use our issue tracker to report bugs.
Core
General
start.cmd
will now pause when the server exits with a non-zero exit code, to allow viewing any errors.- Adding ban entries with ridiculous date values is no longer permitted and will no longer crash the server on restart. This works around a bug in the date extension in PHP which permits
format()
to create dates which it cannot parse. - Memory dumps are now created in a separate
memory_dumps
directory.
Commands
/dumpmemory
no longer requires a token to create a memory dump - instead it uses the current time to identify the dump.
Network
- Query packet responses are now sent only to the originating interface, not all interfaces.
- Decreased on-join load by reducing size of
CraftingDataPacket
. - Fixed unhandled packet debug spam when armour items are set from the server side.
World saves
- Region-based worlds will now no longer be loaded if there are a mixture of types of region files in their
region
directory. This would previously cause astonishing undefined behaviour which was dependent on the default level format. An error will now be emitted instead:Cannot identify format of world
. Human
skins now save their skin data usingTAG_ByteArray
instead ofTAG_String
. This is a backwards-incompatible change, earlier versions will raise errors if you haveHuman
entities in your world after upgrading.Human
s now save their cape data, geometry model and geometry data in their NBT.- Fixed a huge number of bugs relating to entities being saved on incorrect chunks in negative coordinates.
- Fixed a bug in Region handling that caused incomplete corrupted regions to be retained and later crash the server.
- Fixed chunks getting saved to disk twice on shutdown.
Player
- Exploits relating to players quitting to main menu on death have been patched.
- Players can no longer modify item frames or signs inside spawn protection.
Dependency libraries
Requires the following libraries:
pocketmine/binaryutils
v0.0.1pocketmine/math
v0.1.0pocketmine/nbt
v0.1.0pocketmine/raklib
v0.11.0pocketmine/spl
v0.3.0
API
WARNING: API changes to dependent libraries are not documented here. See individual library releases for notes on their changes.
Event handler inheritance changes
This is a new major feature of this release, which makes the hierarchy of event handling much more flexible and versatile. See #1792 for details on this. Highlights:
public static $handlerList
is no longer required in event declarations.- Any non-abstract event can have a handler registered to it - for example, you can now register handlers for both
EntityDamageEvent
(which will receive any instanceofEntityDamageEvent
) and also be able to register a separate handler specifically forEntityDamageByEntityEvent
. - Abstract events may be handled using the above rules if they declare the
@allowHandle
PhpDoc annotation. - Handlers will always handle all subclasses of an event. This slightly differs from existing behaviour, where handlers would only receive subclass events which did not declare their own handler lists.
Block
Block->onUpdate()
hook has been removed, and is replaced by several new methods:onScheduledUpdate()
,onNearbyBlockChange()
, andonRandomUpdate()
. The associatedLevel::BLOCK_UPDATE_*
constants have been removed.
Commands
Command->getPermissionMessage()
is now permitted to returnnull
.ConsoleCommandSender->isPlayer()
has been removed.
Entity
Item
,PrimedTNT
andFallingSand
have been moved toobject\ItemEntity
,object\PrimedTNT
andobject\FallingBlock
respectively.- Classes
entity\object\Painting
andentity\object\PaintingMotive
have been added. - Added hook for nearby block updates:
Entity->onNearbyBlockChange()
. - Added API method
Living->hasEffects()
which returns if the entity has any active status effects. Effect
has been split intoEffect
(type) andEffectInstance
. Methods relating to instance-specific things ofEffect
have been moved toEffectInstance
. Seedc3bf8546e
for implementation examples.
Events
PlayerCreationEvent->getClientId()
has been removed.- Added new events
ProjectileHitBlockEvent
andProjectileHitEntityEvent
. - Added new event
PlayerExperienceChangeEvent
. - Triggering a call to an event inside a handler of that event will no longer cause a segmentation fault. Instead, the maximum recursion depth for event calls has now been limited to 50 calls. Trying to go beyond this depth will cause an exception to be thrown.
Inventory
BigCraftingGrid
has been removed. Instead,CraftingGrid
now accepts a grid size in the constructor.- Added API method
Inventory->isSlotEmpty()
. - Optimized
BaseInventory->getContents()
method. DropItemAction
no longer requires a source item in the constructor (this was useless anyway).InventoryAction->getCreationTime()
has been removed.
Crafting
Crafting-related things have been mostly rewritten in this release and have significant changes.
The following classes have been removed:
CraftingTransferMaterialAction
CraftingTakeResultAction
The following classes have significant changes:
CraftingManager
- removed the following:
getRecipe(UUID)
,getRecipes()
matchRecipe()
now acceptsCraftingGrid, Item[]
instead ofItem[][], Item, Item[]
- removed the following:
CraftingTransaction
- All API methods have been removed and are now handled in
CraftItemEvent
- All API methods have been removed and are now handled in
CraftItemEvent
- added the following:
getInputs()
,getOutputs()
,getRepetitions()
- added the following:
Recipe
interface:- Removed
getResult()
(because individual recipes may handle this differently)
- Removed
CraftingRecipe
interface- removed the following:
matchItems()
,getExtraResults()
,getAllResults()
,requiresCraftingTable()
,getId()
,setId()
- added the following:
getResultsFor(CraftingGrid)
,getIngredientList()
,matchesCraftingGrid(CraftingGrid)
- removed the following:
ShapedRecipe
- constructor now accepts
string[], Item[], Item[]
- constructor now accepts
ShapelessRecipe
- constructor now accepts
Item[], Item[]
- constructor now accepts
Item
ItemFactory::init()
no longer callsItem::initCreativeItems()
.ItemFactory::fromString()
now throws exceptions on failure to parse a string as a valid item ID. Previously it would silently return an Air item.- Added API method
Item->getVanillaName()
, which returns the name of an item without any custom name NBT masking it.
Language
event\TranslationContainer
andevent\TextContainer
have been moved to thelang
namespace.
Level
- Added API method
Level->getRandomTickedBlocks()
. Explosion->__construct()
will now throw exceptions on invalid parameters.- Removed dead generator things
Level->generateChunk()
,Level->regenerateChunk()
,GenerationTask
. Level->setBlock()
now clones theBlock
object given as a parameter, fixes unexpected behaviour with setting blocks inBlockPlaceEvent
usingBlockPlaceEvent->getBlock()
.MovingObjectPosition
has been removed.
Player
Player->__construct()
no longer accepts aclientID
parameter.Player->teleportImmediate()
has been removed.Player->getClientSecret()
has been removed.Player->getLastPlayed()
no longer always returns when the player started their current session. In the future it will only return when they last quit the server (or the same as firstPlayed if they haven't played before), but existing save data will still cause the bug until the player next joins.
Plugin
- Added API method
PluginDescription->getMap()
which returns an associative array of the contents ofplugin.yml
. PluginLoader
interface now requires the implementation ofcanLoadPlugin(string) : bool
.
Scheduler
- Throwables thrown from
AsyncTask->onCompletion()
will no longer crash the server.
Server
Server->updatePlayerListData()
now has an extraxuid
parameter before theplayers
parameter.Server->getResourceManager()
has been renamed toServer->getResourcePackManager()
Server->addPlayer()
now accepts aPlayer
as its only parameter.Server->addRecipe()
has been removed. UseServer->getCraftingManager()->registerRecipe()
instead.Server->getConfigBoolean()
has been removed in favour ofServer->getConfigBool()
.Server->getDifficultyFromString()
has been removed in favour of its corresponding method inLevel
.- Added API methods
Server->getPlayerByUUID()
andServer->getPlayerByRawUUID()
.
Utils
- All generic utility functions have been moved from
PocketMine.php
to theUtils
class. - Timezone-related functions have been moved to
pocketmine\utils\Timezone
. TextFormat::toANSI()
has been moved toTerminal
since it directly pertains to the terminal output and has platform-dependent output.
Gameplay
Blocks
- Fixed a block-updating race-condition bug causing ghost blocks to sometimes appear on the client-side.
Commands
- Commands with aliases are now shown correctly on the client-side. Previously only the aliases would be visible and the original command would be missing.
Entities
- Entity teleporting now is now correctly visible to players.
- Regeneration effect no longer permits more than 2 sets of incoming damage per second on mobs.
- Implemented Paintings.
- Projectiles now use ray tracing for movement. This significantly improves movement of projectiles, particularly fixing arrows getting stuck in mid-air and clipping through the corners of blocks.
- Arrows now make the correct collision sound and shake on impact.
- Taking damage with Resistance levels >5 will no longer give the subject absorption hearts.
- Falling blocks are no longer moved by liquid currents.
Items
- Implemented Ender Pearls, Splash Potions and Bottle o' Enchanting.
- Bows and throwable projectiles now make the correct sound when used.
- Implemented armour durability.
- Added some missing food items.
- Fixed mess of incorrectly-registered Fish items.
Player
- Xbox Live icons are now shown on the server list.
- Fixed a slot count offset bug that caused changes to player armour not to be visible in the inventory.
- Implemented critical hits.
- Players can no longer eat food requiring hunger when in creative mode.
- Fixed block placement bugs due to AABB floating-point inaccuracies.
3.0.0-ALPHA12 build 999
For Minecraft: Bedrock Edition 1.4.0
This release is a support patch for Minecraft: Bedrock Edition v1.4.0 (protocol version 261). It has no breaking changes over the previous ALPHA12 release (1.7dev-937).
3.0.0-ALPHA12 build 1001
For Minecraft: Bedrock Edition 1.4.0
This release is a hotfix update over the previous build and has no breaking changes versus the previous release (1.7dev-999).
Fixes
- Command data is no longer sent on permission recalculation prior to player spawning, fixes game crash issues when the server is using PurePerms or similar.