mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2024-11-24 02:46:12 +00:00
7.9 KiB
7.9 KiB
For Minecraft: Bedrock Edition 1.18.0
Note about API versions
Plugins which don't touch the protocol and compatible with any previous 4.x.y version will also run on these releases and do not need API bumps. Plugin developers should only update their required API to this version if you need the changes in this build.
WARNING: If your plugin uses the protocol, you're not shielded by API change constraints. You should consider using the mcpe-protocol
directive in plugin.yml
as a constraint if you do.
4.1.0
Released 7th February 2022.
General
- Game mode names (e.g.
survival
,creative
) may now be used for thegamemode
property inserver.properties
. - Increased default maximum render distance to 16 chunks. Players with a render distance smaller than this will notice no difference.
- The setup wizard now prompts for a maximum render distance value.
- The setup wizard now prompts for an IPv6 port selection. Previously it would always use 19133.
chunk-ticking.disable-block-ticking
now accepts block names like those used in the/give
command.- The
/clear
command now behaves more like vanilla:- The order of inventories is now the same as Bedrock.
- The cursor and offhand inventories are now cleared if necessary.
Technical
PlayerAuthInputPacket
is now used instead ofMovePlayerPacket
for processing movements. This improves position and rotation accuracy.&&
and||
are now always used instead ofand
andor
.- New version of
pocketmine/errorhandler
is used by this version, adding support forErrorToExceptionHandler::trap()
. This enables reliably capturingE_WARNING
andE_NOTICE
from functions such asyaml_parse()
and friends. - New dependency versions are required by this version:
API
Block
- The following classes have been added:
Lectern
Pumpkin
- The following public API methods have been added:
Block->getTypeId() : int
- returns an integer which uniquely identifies the block type, ignoring things like facing, colour etc.VanillaBlocks::LECTERN()
utils\BrewingStandSlot->getSlotNumber() : int
utils\FurnaceType->getCookSound() : Sound
- The following API constants have been added:
tile\BrewingStand::BREW_TIME_TICKS
Crafting
- The following API methods have been added:
CraftingManager->getPotionContainerChangeRecipes() : array<int, array<string, PotionContainerChangeRecipe>>
CraftingManager->getPotionTypeRecipes() : array<string, array<string, PotionTypeRecipe>>
CraftingManager->registerPotionContainerChangeRecipe(PotionContainerChangeRecipe $recipe) : void
CraftingManager->registerPotionTypeRecipe(PotionTypeRecipe $recipe) : void
- The following classes have been added:
BrewingRecipe
PotionContainerChangeRecipe
PotionTypeRecipe
Entity
- The following classes have been added:
animation\ItemEntityStackSizeChangeAnimation
- The following public API methods have been added:
object\ItemEntity->isMergeable(object\ItemEntity $other) : bool
object\ItemEntity->setStackSize(int $size) : void
object\ItemEntity->tryMergeInto(object\ItemEntity $other) : bool
ExperienceManager->canAttractXpOrbs() : bool
ExperienceManager->setCanAttractXpOrbs(bool $v = true) : void
Entity->getSize() : EntitySizeInfo
Living->isGliding() : bool
Living->isSwimming() : bool
Living->setGliding(bool $value = true) : void
Living->setSwimming(bool $value = true) : void
- The following protected API methods have been added:
Entity->getBlocksIntersected(float $inset) : \Generator<int, Block, void, void>
Event
BlockSpreadEvent
is now called when fire spreads to the positions of blocks it burns away.BlockFormEvent
is now called when concrete powder turns into concrete due to contact with water.- The following classes have been added:
BlockMeltEvent
- called when ice or snow meltsBrewItemEvent
- called when a brewing stand finishes brewing potions; this is called up to 3 times (once for each brewing slot, as needed)BrewingFuelUseEvent
- called when a brewing stand consumes blaze powderChestPairEvent
- called when two chests try to form a pairPlayerToggleGlideEvent
- called when a player starts or stops glidingPlayerToggleSwimEvent
- called when a player starts or stops swimmingPlayerViewDistanceChangeEvent
- called whenever a player alters their render distance or requests one for the first time when connecting
Item
- The following public API methods have been added:
SplashPotion->getType() : PotionType
VanillaItems::AIR()
- The following API methods have been deprecated:
ItemFactory::air()
- useVanillaItems::AIR()
instead
Player
- The following public API methods have been added:
Player->hasBlockCollision() : bool
Player->setHasBlockCollision(bool $value)
- allows controlling spectator-like no-clip behaviour without changing game modePlayer->toggleSwim(bool $swim) : bool
- called by the network system when the client tries to start/stop swimmingPlayer->toggleGlide(bool $glide) : bool
- called by the network system when the client tries to start/stop gliding
Server
- The following public API constants have been added:
Server::DEFAULT_SERVER_NAME
Server::DEFAULT_MAX_PLAYERS
Server::DEFAULT_PORT_IPV4
Server::DEFAULT_PORT_IPV6
Server::DEFAULT_MAX_VIEW_DISTANCE
Utils
- Config parsing errors are now always represented by
ConfigLoadException
and include the path to the file in the message. - Added
TextFormat::MINECOIN_GOLD
, and support for it to the variousTextFormat
methods. - The following public API methods have been added:
Utils::assumeNotFalse()
- static analysis crutch to silence PHPStan errors without usingignoreErrors
or@phpstan-ignore-line
, which are both too coarse.
- The following public API properties have been added:
Terminal::$COLOR_MINECOIN_GOLD
- The following classes have been added:
ConfigLoadException
- Fixed
Random->nextSignedInt()
to actually return a signed int. Previously it would return any integer value between 0 and 4,294,957,295. - Fixed
Random->nextSignedFloat()
to return a float between-1.0
and1.0
. Previously it would return any value between0.0
and2.0
. VersionString->getNumber()
output is now structured differently to fix overflow issues caused by the old format.
World
- The following classes have been added:
sound\BlastFurnaceSound
- the sound made by a blast furnace during smeltingsound\FurnaceSound
- the sound made by a regular furnace during cooking or smeltingsound\ItemUseOnBlockSound
sound\LecternPlaceBookSound
sound\PotionFinishBrewingSound
- the sound made by a brewing stand when a potion finishes being brewedsound\SmokerSound
- the sound made by a smoker during cooking
Gameplay
Blocks
- Fire now spreads.
- Implemented lectern blocks.
- Added missing sounds for hoeing grass and dirt.
- Added missing sounds for using a shovel on grass to create grass path.
- Pumpkins can now be carved using shears.
- Brewing stands can now be used for brewing potions.
- The visual appearance of a brewing stand now updates correctly when the contents of its inventory changes (adding/removing potions).
- Added missing sounds for furnace, blast furnace and smoker.
- Fixed ender chest not dropping itself when mined with a Silk Touch pickaxe.
- Cobwebs now drop themselves when mined using shears.
- The correct amount of fall damage is now taken when falling from a height onto hay bales.
Items
- Dropped items of the same type now merge with each other.