For Minecraft: Bedrock Edition 1.6.0
This is a new minor feature release, including support for Minecraft Bedrock 1.6.0, some new minor gameplay features and some API deprecations and additions.
Note
Plugins compatible with any previous 3.x.y version will also run on this build and do not need API bumps.
However, some API features have been deprecated in this version. Plugin developers do not need to do anything about these deprecations immediately, however they may raise harmless warnings if used.
Features marked @deprecated
are recommended not to be used, but will continue to work for any future 3.x.y versions. They will be removed in the next major release (4.0).
Changes
Core
Level
generators are now registered only when needed instead of as soon as a worker starts. This drastically reduces memory consumption on servers with lots of workers.- Async workers are now garbage-collected along with everything else on the default schedule. Idle workers with 0 queued tasks will be shutdown and removed from the pool to reduce memory usage.
- UPnP error messages are now more informative of troubleshooting steps.
- Errors are no longer caught in cases where they are unrecoverable.
API
Entity
- Arrow pickup mode can now be controlled via
Arrow->setPickupMode()
. This accepts one of threeArrow
constants:PICKUP_NONE
,PICKUP_ANY
,PICKUP_CREATIVE
. - Added new API methods
Projectile->getBaseDamage()
andProjectile->setBaseDamage()
. - Added new API methods
Entity->getScoreTag()
andEntity->setScoreTag()
.
Events
- The
Listener
interface has now received in-depth documentation about its behaviour and uses. See the top of theListener
class to read it. - It is now possible to declare
@ignoreCancelled
on an event handler without specifyingtrue
orfalse
. If no value is found,true
will be assumed. ServerCommandEvent
andRemoteServerCommandEvent
are now@deprecated
and their usage discouraged. A new genericCommandEvent
has been introduced in its place, which allows capturing commands from any type of command sender. This was done in response to difficulties of code duplication when wanting to intercept commands from both console and players.EntityDamageEvent
- Added
MODIFIER_WEAPON_ENCHANTMENTS
constant for attack damage bonuses due to enchantments like Sharpness. - Added new API methods
getAttackCooldown()
andsetAttackCooldown()
to allow controlling Living entities attack cooldown times (default 10 ticks).
- Added
PlayerDeathEvent
: Added new static methodderiveMessage()
.PlayerKickEvent
: Added new methodsetReason()
.
Forms
- Added a new
pocketmine\form\Form
interface. Implementing this interface permits custom form implementations to make use ofPlayer->sendForm()
, eliminating the need to handle packets directly and also solving the form ID collision problem.
Items
Item
andItemFactory
now support negative item IDs (needed for future extended blocks support).- Updated
ItemIds
interface with new constants.
Permission
- Added a new
PermissionManager
class which encapsulates all of the permission-management functionality originally bloatingPluginManager
. The API is identical to that ofPluginManager
's permission API. All methods moved toPermissionManager
have@deprecated
redirects remaining behind inPluginManager
, which will be removed in the next major release (4.0).
Plugin
PluginBase->getConfig()
will now automatically save the default config if it does not already exist.- Plugin data directories will now be automatically created on plugin load, eliminating the need for boilerplate
@mkdir($this->getDataFolder())
calls at the top of every plugin.
Tile
Tile::createNBT()
will now throw aBadMethodCallException
when called directly.
Utils
Utils::getURL()
,Utils::postURL()
,Utils::simpleCurl()
andUtils::getIP()
have been moved to a newpocketmine\utils\Internet
class. The original methods are@deprecated
and will be removed for the next major version (4.0).- Removed the ability for
Config
to be asynchronously saved. This was discussed for removal because of various problems that it causes. It was deemed not worth fixing sinceConfig
saving should not be significant enough to cause problems anyway. See #2298 for details.
Server
- Deprecated
level
parameter offindEntity()
. This parameter was premature optimization. Code using it will continue to work as before.
Gameplay
General
- Air bubbles are now regenerated at the same speed as vanilla UpdateAquatic, instead of instantly when leaving water.
- Implemented Conduit Power effect.
Enchantments
- Implemented the following enchantments: Thorns, Sharpness, Knockback, Fire Aspect, Power, Punch, Flame, Infinity, Mending.
Items
- Added the following new items:
Scute