跳到主要内容

Minecraft Beta & Preview - 1.20.10.23

Dedicated Server

  • Fixed invalid entries in allowlist.json causing crash (BDS-18133)

Add-Ons and Script Engine

  • Actually fixed the bug that caused player capes to stop flapping when moving forward but looking sideways in the query.cape_flap_amount by switching the rotation used from the player's looking rotation to the player's body rotation (MCPE-153446)
  • Observer blocks use state "minecraft:facing_direction" instead of "facing_direction". "minecraft:facing_direction" uses string values ("down", "up", "north", "south", "east", "west")

Entities

  • Custom entities are no longer restricted to overriding Vanilla entities released before 1.20. All Vanilla entities can be used in the "identifier" or "runtime_identifier" field, including Camel and Sniffer.

Items

  • Released the "minecraft:shooter" item component out of experimental in json formats 1.20.10 and higher
  • Released the "minecraft:throwable" item component out of experimental in json formats 1.20.10 and higher
  • Released the "minecraft:projectile" item component out of experimental in json formats 1.20.10 and higher
  • Released the "minecraft:can_destroy_in_creative" item component out of experimental in json formats 1.20.10 and higher
  • Released the "minecraft:hover_text_color" item component out of experimental in json formats 1.20.10 and higher

Editor

The Editor is in early development, and available for keyboard/mouse on Windows PC Bedrock Preview builds. Learn how to use the Editor and join the GitHub Discussion forum, post bugs, view more detailed release notes. Tag us on social channels with #BedrockEditor.

  • Fixed a bug where error messages related to initial script loading were not being displayed in the log panel
  • /scriptEvent command can now be used in the editor without the need to enable the Beta APIs experiments
  • Fixed a bug where the viewport scaling was not working correctly on devices that use D3D11

实验性特性

Script API

  • Dynamic Property identifiers are now limited to 1024 characters.
  • Removed MinecraftEffectTypes defined in @minecraft/server. See @minecraft/vanilla-data NPM package for an equivalent.

Moved several APIs to stable 1.3.0:

  • Moving tryTeleport(location: Vector3, duration: number, options: ScriptTeleportOptions) to 1.3.0
  • Moving teleport(location: Vector3, options: ScriptTeleportOptions) to 1.3.0
  • Moved function getComponent to 1.3.0
  • Moved world event PlayerJoinAfterEvent to 1.3.0
  • Moved world event PlayerLeaveAfterEvent to 1.3.0
  • Moved world event PlayerSpawnAfterEvent to 1.3.0
  • Moved EntityComponent EntityHealableComponent to 1.3.0
  • Moved EntityComponent EntityHealthComponent to 1.3.0
  • Moved class FeedItem to 1.3.0
  • Moved class FeedItemEffect to 1.3.0
  • Moving addEffect(effectType: string | EffectType, duration: number, options: EntityEffectOptions) to 1.3.0
  • Moved getEffect(effectType: string | EffectType) to 1.3.0
  • Moved getEffects to 1.3.0
  • Moved removeEffect(effectType: string | EffectType) to 1.3.0
  • AfterEvents
    • Moving ButtonPushEvent to 1.3.0
    • Moving LeverActivateEvent to 1.3.0
  • Moved function spawnEntity to 1.3.0
  • Moved function spawnItem to 1.3.0

Spawn Point Updates:

  • Removed function clearSpawn
  • Removed property spawnDimension
  • Added function getSpawnPoint: DimensionLocation | undefined- Returns the player's spawn point
  • Added function setSpawnPoint(spawnPoint?: DimensionLocation): void- Sets the player's spawn point, or clears it if spawnPoint is undefined
  • Renamed function getDefaultSpawnPosition to getDefaultSpawnLocation
  • Renamed function setDefaultSpawn to setDefaultSpawnLocation
  • DimensionLocation
    • Added new interface DimensionLocation- Represents a location in a dimension
  • Added hasParticipant function to ScoreboardObjective.
  • The following functions in ScoreboardObjective can now accept Entity or string types as participants:
    • getScore
    • setScore
    • removeParticipant
  • Removed getScoresetScore from ScoreboardIdentity and Scoreboard.

Removed the removeFromObjective function from ScoreboardIdentity.

  • Fixed bug where scoreboard values would not be updated on the client when updated from script.

  • Raycasting

    • Changed function getBlockFromRay
      • Changed return type from Block to BlockRaycastHit | undefined
    • Changed function getEntitiesFromRay
      • Changed return type from Entity[] to EntityRaycastHit[]
    • Changed function getBlockFromViewDirection
      • Changed return type from Block to BlockRaycastHit | undefined
    • Changed function getEntitiesFromViewDirection
      • Changed return type from Entity[] to EntityRaycastHit[]
    • Added interface BlockRaycastHit
    • Added interface EntityRaycastHit
  • Renamed leverActivate after event to leverAction

    • Removed class EntityHitAfterEvent.
    • Added class EntityHitBlockAfterEvent
    • Added class EntityHitEntityAfterEvent
    • Class WorldAfterEvents
      • Removed property entityHit
      • Added property entityHitBlock
      • Added property entityHitEntity
    • Added helper function isValid to several classes in order to check if the object is valid. This can safely be used on any handle to a native object before accessing or using the object, to ensure the underlying object still exists and is valid to use.
      • Block (checks the block is a valid position in bounds and the containing chunk is loaded & ticking)
      • Container (checks the relevent container inventory exists and is valid)
      • Effect (checks the owning entity is valid and the effect exists on that entity)
      • ScreenDisplay (checks the owning player is valid)
      • ScoreboardObjective (checks the objective entry exists and is attached to a valid scoreboard)
      • Entity (checks that the entity exists in the world. Will return true if the entity is dead)
        • Player
        • SimulatedPlayer (Note simulated players do not automatically get removed from the world, so isValid will return true long after they are dead)
      • ContainerSlot (checks the item context is valid: Container exists in the world, such as the owning entity, and the slot is within the container bounds)
        • Already existed as a readonly property, changed to a method for consistency
      • Component
        • EntityAttributeComponent (checks the owning entity is valid and the attribute exists on the entity)
        • BlockLiquidContainerComponent (checks block exists and is a valid cauldron type)
          • Added read only method isValidLiquid which checks if the liquid in the cauldron matches the component in question (EG. BlockLavaContainerComponent checks for lava liquid)
        • EntityComponent (checks the owning entity exists)
        • ItemComponent (checks the owning item exists)
  • World

  • Renamed getTime to getTimeOfDay.

  • Renamed setTime to setTimeOfDay.

  • setTimeOfDay now accepts a TimeOfDay enum as an argument.

  • The timeOfDay argument for setTime must now be within 0-23999 (inclusive).

  • Added getDay

Updated the following enums' values to be PascalCase instead of camelCase:

  • ClipboardMirrorAxis
  • ClipboardRotation
  • HttpRequestMethod
  • FormCancelationReason
  • Direction
  • DisplaySlotId
  • EntityLifetimeState
  • FluidType
  • ObjectiveSortOrder
  • ScoreboardIdentityType
  • ScriptEventSource
  • SignSide
  • WatchdogTerminateReason
  • WeatherType 

Experimental Cameras

  • Camera preset JSON now supports an optional bool 'player_effects' value which causes game rendering to use player effect state (for example night vision) when this preset is active. Added the "example:example_player_effects" preset to demonstrate this
  • Camera command can now take a 'facing' option instead of a 'rot' option with a target entity or position specified
  • Fixed custom cameras to not use the 'inside block' effect when player head is inside a block (MCPE-170206)

Items

  • Deprecate "minecraft:render_offsets" component in json formats 1.20.10 and higher
  • Changed charging action behavior in "minecraft:shooter" to match Vanilla crossbow Changed shooting behavior for a charged "minecraft:shooter" with an empty inventory/offhand to successfully shoot the charged ammunition