跳到主要内容

Minecraft Beta & Preview - 1.19.0.20/21

General

  • Volume instances are now stored in the world, persisting between play sessions
  • Limit path strings and loc ID strings in data-driven blocks to 256 characters
  • Limit the length of crafting tag strings in CraftingTableComponent to 64 characters
  • Limit the number of elements in the material_instancesfield of the BlockMaterialInstancesComponent to 64
  • Limit the number of elements in the conditionsand block_filter fields of the BlockPlacementFieldComponent to 64
  • Updated documentation for originand size fields of the minecraft:block_collision and minecraft:aim_collision components

Item Components

  • Added new data-driven Item component minecraft:chargeable- Allows the item to be charged (like Apples or Bows) when the use action button is held on_complete - Trigger executed when the items use duration has been completed

Commands

  • Reload command will now discover new function and script files

Dedicated Server

  • Enable Windows Dedicated Server console to read UTF-16 encoded unicode input (BDS-3791)

Actors

  • Added in check to prevent an actor that is a passenger from being ridden by the vehicle it is on preventing an infinite loop looking for the root vehicle (MCPE-133774)

AI Goals

  • Exposed new data parameter "can_sleep_while_riding" for "minecraft.behavior.sleep". If set to false, the goal will not start if the mob is riding

Commands

  • The '/spreadplayers' command will now avoid more hazardous locations

Gameplay

  • Fixed crashing issue on some Marketplace worlds

General

  • Actor properties can now be applied to player entities. Updated network protocol version to support this (MCPE-129628)

Mobs

  • Entities that use KnockbackRoarGoal can once again properly use entity filters to determine damage

Molang

  • Fixed a crash in query.variant related to thrown potions and invalid potion IDs

Experimental Features

GameTest Framework

  • Fixed Date.now() to no longer truncate to a 32-bit integer

mojang-gametest module: Test

  • Added function rotateVector- Rotates a vector relative to the GameTest structure rotation

mojang-minecraft module

  • New property on Player: onScreenDisplay : ScreenDisplay - exposes a new interface to trigger on screen content
  • ScreenDisplay Type
    • setTitle(title : String, options? : TitleDisplayOptions) - cause a title to show up on the player's HUD, optionally specifying the subtitle and fade in, stay and fade out times
    • clearTitle() - clear title and subtitle
    • updateSubtitle(subtitle : String) - update the subtitle (but not the title)
    • setActionBar(text : String) - set the action bar text
  • TitleDisplayOptions object
    • subtitle? : String - optional subtitle
    • fadeInSeconds : Int - number of seconds to fade in new title and subtitle
    • staySeconds : Int - number of seconds to have the title and subtitle stay on screen
    • fadeOutSeconds : Int - number of seconds to fade out title and subtitle

Support of dynamic properties that script can use to persist data per-World or per-Entity.  Note that properties must be registered using the propertyRegistry in the new WorldInitialize event

  • DynamicPropertiesDefinition
    • Added function defineNumber(identifier: string): void- Defines a dynamic number property
    • Added function defineString(identifier: string, maxLength: number): void- Defines a dynamic string property
    • Added function defineBoolean(identifier: string): void- Defines a dynamic boolean property
    • Added event worldInitialize(worldInitializeEvent: WorldInitializeEvent)- Fires during world load and contains the property registry used for declaring dynamic properties
  • PropertyRegistry
    • Added function registerEntityTypeDynamicProperties(propertiesDefinition: DynamicPropertiesDefinition, entityType: EntityType)- Registers dynamic property definitions for the given EntityType

    • Added function registerWorldDynamicProperties(propertiesDefinition: DynamicPropertiesDefinition)- Registers property definitions for the world

  • World object/Entity object additions:
    • Added function setDynamicProperty(identifier: string, value: boolean | string | number)- Adds a dynamic property to the world/entity

    • Added function getDynamicProperty(identifier: string): boolean | string | number- Gets a dynamic property from the world/entity if it exists, otherwise returns undefined

    • Added function removeDynamicProperty(identifier: string): boolean- Removes a dynamic property value from the world/entity

  • New events:
    • Added event events.projectileHit- Fires when a projectile hits a Block or Entity
    • Added event events.itemStartUseOn- Sent when the player first interacts with a block
    • Added event events.itemStopUseOn- Sent when fire if the block is successfully interacted with and the block has changed - such as when grass is turned to a path with a Shovel
    • Added event events.itemStartCharge– Sent when the player first starts using a charging/animated item
    • Added event events.itemCompleteCharge- Sent when the item has completed its charge action
    • Added event events.itemReleaseCharge- Sent when the user has finished using the item and released the build action
    • Added event events.itemStopCharge- Sent either when the player has finished an items use cycle or when the player has released the use action with the item
    • ItemStartUseOnEvent Added read only property buildBlockLocation- The result build block position. Useful for determining where a block was placed
    • Added member player?: Playerto the LeverActivate event - The player that activated the lever