github pmmp/PocketMine-MP api/3.0.0-ALPHA10
PocketMine-MP 1.7dev-501 with API 3.0.0-ALPHA10

latest releases: 5.15.0, 5.14.1, 5.14.0...
pre-release6 years ago

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 or aliases.
  • 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 a Vector3 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 its targets parameter. For a Human, using NULL will broadcast its skin to all players who can see it. For a Player, 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() and Entity->isFlaggedForDespawn(). These should be used instead of kill()/close() and isAlive() 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 for RIGHT_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 and EntityEffectRemoveEvent 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() and Armor->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 in LightUpdate and Explosion 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 style en_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 is Server->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.

Don't miss a new PocketMine-MP release

NewReleases is sending notifications on new releases.