Skip to content

Releases: pmmp/PocketMine-MP

PocketMine-MP 1.7dev-717 with API 3.0.0-ALPHA11

14 Feb 12:43
Compare
Choose a tag to compare

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)

PocketMine-MP 1.7dev-703 with API 3.0.0-ALPHA11

11 Feb 10:10
Compare
Choose a tag to compare

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.

PocketMine-MP 1.7dev-698 with API 3.0.0-ALPHA11

08 Feb 11:59
Compare
Choose a tag to compare

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).

PocketMine-MP 1.7dev-677 with API 3.0.0-ALPHA11

04 Feb 18:12
Compare
Choose a tag to compare

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.

Notable changes

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 and pocketmine\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 TypeErrors.

API

Block

  • Added API methods Block->getDropsForCompatibleTool() and Block->getSilkTouchDrops().
  • Block->canBeBrokenWith() has been renamed to isCompatibleWithTool().

Enchantments

  • Enchantments have been split into enchantment types (Enchantment) and enchantment instances (EnchantmentInstance). EnchantmentInstances 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 from Human.
  • Added the following Human API methods: addXpLevels(), subtractXpLevels(), getCurrentTotalXp(), setCurrentTotalXp(), addXp(), subtractXp(), getLifetimeTotalXp() andsetLifetimeTotalXp().
  • Added API methods Entity->isInvisible() and Entity->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 to Inventory->clearAll()
  • Added a $includeEmpty parameter to Inventory->getContents()
  • Removed Inventory->getHolder(). Inventories no longer require that you give them an InventoryHolder. A holder is now optional to be implemented by subclasses and is not required to be an InventoryHolder.
  • Armor handling has been removed from PlayerInventory and separated into its own ArmorInventory class.
    • All armor-related methods have been removed from PlayerInventory
    • ArmorInventory now contains armor-specific logic. All living entities have an armor inventory.
  • 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 to Durable 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 how addChunkPacket() works.
  • Added API method Level->dropExperience(), which drops a given amount of XP as XP orbs into the world.
  • LevelProviders are no longer dependent on Levels. This is a significant change because it makes it possible to construct LevelProviders on threads without a Level, 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 a Chunk object read from disk.
    • saveChunk() now directly accepts a Chunk object instead of coordinates.
    • __construct() now only accepts a string $path, the Level parameter has been removed.
    • The following methods have been obsoleted, and therefore removed: getChunk(), setChunk(), saveChunks(), unloadChunk(), unloadChunks(), isChunkLoaded(), getLoadedChunks(), isChunkGenerated(), isChunkPopulated() and getLevel()
  • getServer() method has been removed from BaseLevelProvider.

Math

  • Added Math::solveQuadratic()
  • Fixed Vector2's coordinates magically incrementing when ceil() 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 on MovingObjectPosition).
  • 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 of NBTStream (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 of PHP_EOL when preparing messages to send to players, since PHP_EOL is platform-dependent.
  • API method TextFormat::colorize() has been added (see #1837 for details).
  • BlockIterator has been removed in favour of math\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.

PocketMine-MP 1.7dev-516 with API 3.0.0-ALPHA10

14 Dec 19:10
Compare
Choose a tag to compare

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).

PocketMine-MP 1.7dev-501 with API 3.0.0-ALPHA10

22 Jan 18:12
Compare
Choose a tag to compare

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.

PocketMine-MP 1.7dev-318 with API 3.0.0-ALPHA9

22 Jan 18:16
Compare
Choose a tag to compare

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 accepts Skin instead of string, string
  • Server->updatePlayerListData() now accepts Skin instead of the old skin string parameters.

Other changes

  • Projectile-related classes such as Projectile, ProjectileSource, Snowball etc have been moved to an entity\projectile namespace.
  • Added EntityIds interface containing named constants for Minecraft: Bedrock entity type IDs.
  • Added API methods Entity->canSaveWithChunk() and Entity->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; override Entity->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() and BaseInventory->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 to ListTag'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 empty CompoundTag 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() and Item->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() and Player->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

25 Sep 17:03
Compare
Choose a tag to compare

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

API

Block

  • Added API method BlockFactory::isRegistered()

Events

  • Added PlayerBlockPickEvent
  • API method CraftItemEvent->getTransaction() has been added and returns a CraftingTransaction object.
  • InventoryTransactionEvent->getTransaction() now returns an InventoryTransaction instead of a TransactionGroup

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 and SlotType classes

  • Added the following:

    • InventoryTransaction - used for regular inventory transactions, this replaces the old SimpleTransactionGroup in terms of functionality
    • CraftingTransaction - represents an InventoryTransaction 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 old BaseTransaction.
      • 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 and BigCraftingGrid 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() and ContainerInventory->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() and BaseInventory->setItem() will now throw an exception if an out-of-bounds inventory slot index is given.

  • ShapedRecipe's constructor has been changed, it now accepts Item $result, string[] $shape, Item[] $shapeItems, Item[] $extraResults.

  • Removed BigShapedRecipe and BigShapelessRecipe - these have been obsoleted by the addition of CraftingRecipe->requiresCraftingTable()

  • Added send parameters to BaseInventory->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!!! Use Server->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 of AsyncTask->__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

15 Sep 10:37
Compare
Choose a tag to compare

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

06 Sep 12:11
Compare
Choose a tag to compare

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
  • Task->onRun():
    • before: onRun($currentTick)
    • after: onRun(int $currentTick)

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 a CommandExecutor 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() and Item->canBeActivated() have been removed due to extra confusion they caused in the implementation of new gameplay features.
  • Block->getDrops() now returns Item[] instead of int[][]. Plugins which use this method will need alterations.
  • Block::get() now redirects to BlockFactory::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() or BlockFactory::get() should be used instead for getting block instances to set into the world.
  • Block->getResistance() has been deprecated, superseded by Block->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() and Entity->heal().
  • Entity->getHealth() now returns a float, and Entity->setHealth() now accepts floats.
  • Redundant public property Entity->length has been removed.
  • Entity->closed is now protected, use Entity->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 and Item->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() or ItemFactory::get() should be used instead for getting item instances to set into an inventory.
  • Item::get() and Item::fromString() now redirect to their respective methods in ItemFactory. This is backwards compatible with existing implementations.
  • The count parameter has been removed from Item::__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 returns normal in getName().

Math

  • Added precision and rounding mode arguments to Vector3->round(). This defaults to the original behaviour if the arguments are not specified.
  • Position->equals() and Location->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 methods registerPacket() and getPacket() have been removed from Network. This is to allow easier auto-generation of protocol-related code.
  • Added PlayerNetworkSessionAdapter. This is currently used to reduce the amount of empty handlers in Player, however this may cause problems which override handlers in Player to handle packets. Plugins which override Player->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() and Packet->encode() should no longer be overridden by plugins as core functionality is performed in here. Use Packet->decodePayload() and Packet->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 is 2.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 of MainLogger::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 and SignChangeEvent 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 override Spawnable->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...
Read more