跳到主要内容

Minecraft Beta & Preview - 1.19.70.20

Mobs

  • Tropical Fish spawn rules .json file is now located in the correct folder (MCPE-165963)
  • Witch potion drinking and ranged attack behaviour is now defined in its .json file

Creative

  • The game will no longer create a content error when Bee spawn eggs are used on a Spawner
  • Behavior packs with scripts can now be removed from worlds

实验性特性

Commands

  • Fixed a crash with deferred command execution when the executing actor is removed before execution

Script API

  • IMPORTANT BREAKING CHANGE: The classes _Location_and BlockLocation no longer exist in the beta script API. All usages of these classes have been changed to use the Vector3 interface (that is, { x: 1, y: 2, z: 3} objects).
  • Also, note that several changes were made to properties and get/set methods across objects (listed below) to make them more consistent in calling structure.
  • ItemStack
    • Item lore can now be cleared by calling setLore(undefined) or setLore([])
    • Added function clearLore- Clears the item lore
  • ItemStack
    • Fixed a bug where calling function getComponent or _ItemStack.getComponents_would fail on ItemStacks returned from EntityItemComponent.itemStack
  • BeforeChatEvent
    • Renamed function tell to sendMessage
  • Block
    • Added function isAir- Returns if the block is an air block (i.e. empty space)
    • Added function isLiquid- Returns if the block is a liquid (e.g., a water block and a lava black are liquid, while an air block and a stone block are not).
    • Added function isSolid- Returns if the block is solid (e.g., a cobblestone block and a diamond block are solid, while a ladder block and a fence block are not).
    • The following blocks now have an inventory component:
      • Barrel
      • Beacon
      • Blast Furnace
      • Brewing Stand
      • Dispenser
      • Dropper
      • Furnace
      • Hopper
      • Jukebox
      • Lectern
      • Smoker
    • World Events
      • Added event entityDie- It is fired when an entity dies.
      • Modified _projectileHit_to be a readOnly property on the Events class
    • Player
      • Added method 'getSpawnPosition' : Gets the spawnPoint position
      • Added property 'spawnDimension' : Gets the spawnPoint dimension
      • Added method 'setSpawn'(spawnPosition : Vec3, spawnDimension : Dimension) : Sets spawnPoint with a position and dimension
      • Added method 'clearSpawn' : Sets the spawnPoint position and dimension to undefined
    • World
      • Renamed function _say_to sendMessage
      • Added method 'getDefaultSpawnPosition' : Gets the spawnPoint position
      • Added method 'setDefaultSpawn'(spawnPosition : Vec3) : Sets the spawnPoint position within 'overworld' dimension
    • BeforeChatEvent
      • Added function getTargets(): Player[]- Gets chat Player targets
      • Added function setTargets(players: Player[])- Sets chat Player targets
      • Removed property targets
    • BeforeDataDrivenEntityTriggerEvent
      • Added function getModifiers(): DefinitionModifier[]- Gets entity definition modifiers
      • Added function setModifiers(modifiers: DefinitionModifier[])- Sets entity definition modifiers
      • Removed property modifiers
    • BoolBlockProperty
      • Added function getValidValues(): boolean[]- Gets all valid boolean values for the BoolBlockProperty
      • Removed property validValues
    • Converted _BlockHitInformation_to an interface
    • ChatEvent
      • Added function getTargets(): Player[]- Gets chat Player targets
      • Removed property targets
    • Converted _Color_to an interface
    • DataDrivenEntityTriggerEvent
      • Added function getModifiers(): DefinitionModifier[]- Gets Entity definition modifiers
      • Removed property modifiers
    • DefinitionModifier
      • Added function getComponentGroupsToAdd(): string[]- Gets component groups that will be added with the DefinitionModifier
      • Added function setComponentGroupsToAdd(newGroups: string[]): void- Sets component groups that will be added with the DefinitionModifier
      • Added function getComponentGroupsToRemove(): string[]- Gets component groups that will be removed with the DefinitionModifier
      • Added function setComponentGroupsToRemove(removedGroups: string[]): void- Sets component groups that will be removed with the DefinitionModifier
      • Added function getTriggers(): Trigger[]- Gets event triggers of the DefinitionModifier
      • Added function setTriggers(newTriggers: Trigger[]): void- Sets event triggers of the DefinitionModifier
      • Removed property componentGroupsToAdd
      • Removed property componentGroupsToRemove
      • Removed property triggers
    • DirectionBlockProperty
      • Added function getValidValues(): Direction[]- Gets all valid direction enum values for the DirectionBlockProperty
      • Removed property validValues
    • Entity
      • Added function getViewDirection(): Vector3- Gets view direction of the Entity
      • Added function getRotation(): XYRotation- Gets rotation of the Entity
      • Added function getVelocity(): Vector- Gets velocity of the Entity
      • Removed property viewDirection
      • Removed property rotation
      • Removed property velocity
    • EntityAgeableComponent
      • Added function getDropItems(): string[]- Gets items that drop when entity grows
      • Added function getFeedItems(): EntityDefinitionFeedItem[]- Gets items that can be fed to the entity
      • Removed property dropItems
      • Removed property feedItems
    • EntityBreathableComponent
      • Added function getBreatheBlocks(): BlockPermutation[]- Gets blocks entity can breathe in
      • Added function getNonBreatheBlocks(): BlockPermutation[]- Gets blocks entity can't breathe in
      • Removed property breatheBlocks
      • Removed property nonBreatheBlocks
    • EntityHealableComponent
      • Added function getFeedItems(): FeedItem[]- Gets healing items for the EntityHealableComponent
      • Removed property items
    • Converted _EntityHitInformation_to an interface
    • EntityRideableComponent
      • Added function getFamilyTypes(): string[]- Gets supported rider entity types
      • Added function getSeats(): Seat[]- Gets rider information for each seat
      • Removed property familyTypes
      • Removed property seats
    • EntityTameableComponent
      • Added function getTameItems(): string[]- Gets tame items of the EntityTameableComponent
      • Removed property tameItems
    • FeedItem
      • Added function getEffects(): FeedItemEffect[]- Gets effect of the FeedItem
      • Removed property effects
    • IntBlockProperty
      • Added function getValidValues(): number[]- Gets all valid integer values for the IntBlockProperty
      • Removed property validValues
    • ItemDurabilityComponent
      • Added function getDamageRange(): NumberRange- Gets the range of numbers that describes the chance of the item losing durability
      • Removed property damageRange
    • Converted _NumberRange_to an interface
    • ProjectileHitEvent
      • Added function getBlockHit(): BlockHitInformation- Gets block hit information from the ProjectileHitEvent
      • Added function getEntityHit(): EntityHitInformation- Gets entity hit information from the ProjectileHitEvent
      • Removed property blockHit
      • Removed property entityHit
    • StringBlockProperty
      • Added function getValidValues(): string[]- Gets all valid string values for the StringBlockProperty
      • Removed property validValues