跳到主要内容

Minecraft Beta & Preview - 1.21.50.24

Script API

  • Added beforeEvents object to @minecraft/server-net module version 1.0.0-beta which exposes two events
    • packetReceive: This event is called when the game server receives a network packet from a client. If cancelled, the server will silently ignore the packet.
    • packetSend: This event is called when the game server sends a network packet to client(s). If cancelled, the packet is dropped and never sent to the recipients.

Blocks

  • Added new field "ambient_occlusion_exponent" to blocks.json file schema in resource packs, replaces broken "brightness_gamma" field.

Editor

  • Fix a bug preventing the Quick Panel from being draggable using the drag icon on the header

  • Fix a bug that caused the dropdown menu to open with an incorrect position inside a scrollable pane

  • Added overflow handling for menu bar to collapse overflowing items into a menu and improved submenus to fit within window bounds

  • Improved persistent settings storage. The editorOptions.txt file is now located in the editor subfolder in the same AppData directory.

  • Improved viewport focus visibility with an animated outline on focus and added focused state as a step for Toggle Mode (CTRL + TAB)

  • Added focusToolInputContext function to IModalToolContainer which will try to set modal input focus (e.g. viewport for tool rail)

User Interface

  • Fixed a spelling error in an advanced tip for worlds with resource packs

实验性特性

Script API

  • Added new method lookAt to Entity which sets the rotation of the entity to face the desired target location.

Scripting

  • Enum InputMode.
    • Removed Undetermined entry.
  • Class InputInfo.
    • Throws EngineError instead of Error in case of internal error.