跳到主要内容

Minecraft Beta & Preview - 1.20.40.20

Add-Ons and Script Engine

  • Changed the names of the CameraSetOptions options to not include the word 'Script'

Commands

  • Re-entering a world no longer breaks command autocomplete after a command using "@e[type=item]" was used (MCPE-164734)
  • The /damage command with the "override" cause now causes damage through post hit invulnerability (MCPE-160290)
  • The recipe command color has been changed to white instead of blue (MCPE-173362)

Components

  • Added a content error when attempting to load a damage sensor with an invalid "cause" value 
  • Allow single value parsing for "minecraft:icon" item component
  • The Camel mob Dash Component can now be applied to rideable mobs other than Horse, Donkey, and Mule using “minecraft:dash

Molang

  • Molang updated to version 1.20.40 which replaces "block_property" and "has_block_property" with "block_state" and "has_block_state"
    • This is a Molang Versioned Change that only takes effect for Molang expressions in packs that use a min_engine_version of 1.20.40 or higher

Trade Tables

  • Trade items now have a "filters" property to determine if a trade should be considered 
  • Trade items no longer support the "biome" property to check villager biome types, the "is_mark_variant" filter can be used in the "filters" property instead to check the villager biome type

实验性特性

Script API

  • Added the chat(message: string) method
  • Changed get to return ItemType | undefined
  • Changed source on ItemDefinitionTriggeredAfterEvent to be optional
  • Added the following methods to Player
    • above(steps?: number): Block | undefined;
    • below(steps?: number): Block | undefined;
    • north(steps?: number): Block | undefined;
    • east(steps?: number): Block | undefined;
    • south(steps?: number): Block | undefined;
    • west(steps?: number): Block | undefined;
    • offset(offset: Vector3): Block | undefined;
    • center(): Vector3;
    • bottomCenter(): Vector3;
    • Made getItemStack function return ItemStack or undefined
  • BlockStates
    • Made get function return BlockStateType or undefined
  • Updated ExplosionAfterEvent and ExplosionBeforeEvent
    • getUpdatedBlocks() will now return Block[]
    • setUpdatesBlocks(blocks: Block[]) now takes in a Block[]
  • Added the following methods to Player playMusic(trackId: string, musicOptions?: MusicOptions): void; queueMusic(trackId: string, musicOptions?: MusicOptions): void; stopMusic(): void;
  • Dynamic Properties
    • Property registration is no longer required and propertyRegistry has been removed from the worldInitialize event
    • Removed limits on the count and size of properties that can set on an entity or the world
    • Default values have been removed. getProperty will now always return undefined for unset properties
    • String dynamic property values are now restricted to a length of 32767 bytes
  • Dynamic Properties
    • Removed function removeDynamicProperty - Please use setDynamicProperty with a value of undefined to remove a property
    • Added function getDynamicPropertyIds - Returns an array of all dynamic property ids on an entity/world used by the behavior pack
    • Added function getDynamicPropertyTotalByteCount - Returns the total number of bytes used by all dynamic properties on an entity/world by the behavior pack
    • Added function clearDynamicProperties - Removes all dynamic properties added by this behavior pack from an entity/world
  • Dynamic Properties
    • Dynamic property numbers are now stored with double precision (64 bits)
  • Adding PlayerInteractWithBlock + PlayerInteractWithEntity before & after events
  • Adding PlayerDimensionChangeBeforeEvent and PlayerDimensionChangeAfterEvent in beta 

Graphical

  • Soul Torches are now treated as point lights in the Deferred Technical Preview 
  • Allow data-driving of point lights and their colors for any block via resource packs in the Deferred Technical Preview

Stability and Performance

  • Improved chunk rendering performance in Deferred Technical Preview 

User Interface

  • Fixed a bug where "PBR" was not included in HUD while in level using Deferred Technical Preview