Minecraft Beta & Preview - 1.21.70.20
- 技术更新
- 完整日志
API - Scripting
- Unhandled rejected promises in scripting now include callstacks when logged.
@minecraft/server 1.18.0
-
Renamed
system.scriptEvent
tosystem.sendScriptEvent
-
Moved
NamespaceNameErrorReason
from beta to @minecraft/server 1.18.0 -
Moved
system.sendScriptEvent
from beta to @minecraft/server 1.18.0 -
Moved
NamespaceNameError
from beta to @minecraft/server 1.18.0 -
Released
InputInfo.getButtonState
,InputButton
, andButtonState
to @minecraft/server 1.18.0 -
Released
InputInfo.getMovementVector
to @minecraft/server 1.18.0 -
Released
PlayerButtonInputAfterEvent
,AfterEvents.playerButtonInput
andInputEventOptions
to @minecraft/server 1.18.0 -
Several APIs have been given the Readonly permission, which allows them to now be called inside Before Event callbacks.
- All methods for
BlockVolume
. - All methods for
Vector
.
- All methods for
-
Changed
spawnEntity
method onDimension
to now take a variant of either a string orEntityType
. -
Added
placeFeature
andplaceFeatureRule
APIs to theDimension
class -
Added
isValid
property to the Camera class.
Biomes
- Fix client_biome loading so grass_appearance and foliage_appearance settings are added if not specified when format_version is lower than 1.21.60 (MCPE-189816)
Blocks
-
water
andlava
no longer will turn intoflowing_water
orflowing_lava
when neighbor updates happen.water
andlava
now will respond to queued ticks without needing to change into another block -
The minecraft:map_color component underwent a schema change
-
It is now a JSON object with two fields "color" and "tint_method".
-
"color" is a required string field expecting an HEX representation of the RGB, prefixed with a # character.
-
"tint_method" is a string field that multiplies the color with a predefined tint. Supported values are "none, "default_foliage", "birch_foliage", "evergreen_foliage", "grass" and "water".
-
the old schema format is still supported for convenience.
Examples:"minecraft:map_color": { "color": "#ABCDEF", "tint_method": "grass" }
or
"minecraft:map_color": { "color": "#ABCDEF" }
or
"minecraft:map_color": "#ABCDEF"
-
Components
- Added the 'minecraft:replaceable' component which determines if a new block can replace the existing block at a particular position. If the component is not added to a block it is not replaceable.
Components
-
Multiple components that used effect durations can now be set to "infinite" including:
- "minecraft:attack": "effect_duration"
- "minecraft:healable": "duration" in the "effects" list
- "minecraft:mob_effect": "effect_time"
- "minecraft:projectile": "durationeasy", "durationnormal", and "durationhard" can now all use "infinite"
- "minecraft:food": "duration" in the "effects" list
- "minecraft:spell_effects": "duration" in the "add_effects" list
- "minecraft:combat_regeneration": "regeneration_duration"
Editor
-
Shulker box's textures are fixed in Block picker and lists
-
Fixed a bug that excluded some blocks from block picker list with partial text search
-
Block picker search text field will have UI focus when modal opens
-
Line Tool: Left Click no longer clears the line if two points already exist. Left Click now behaves the same as Shift + Left Click and always adds points to the existing line.
-
Added cursor support for selecting invisible blocks when the Show Invisible Blocks setting is enabled
-
Added
IPropertyPane.addProgressIndicator
API function to display a spinner or a progress bar property item -
Added
ImageAnimationData
API type to represent a sprite sheet animation for images -
Added
iconAnimation: ImageAnimationData
property toIActionBarItemCreationParams
API -
Added
IPropertyPane.addLink
API function to create link buttons in panes. -
Added
system.isEditorWorld
property into @minecraft/server in beta -
Now using minecraft/server 2.0.0-beta, see API section for more details on 2.0.0-beta.
registerEditorExtension
can be called in Early Execution.
Entities
- Fixed issue where
No more entities
assert failure occurred when flying through biomes during a storm
Jigsaw
- Fixed
world_surface
type ofheightmap_projection
inminecraft:jigsaw
to generate on top of water and leaf blocks.
JSON Events
- The parameter "duration" in the "add_mob_effect" event can now be set to "infinite"
Sounds
-
Added support for entity sound variants
- Entity sounds now have a "variants" field which defines sound variants based on the runtime entity
- Variants has a "key" field reading a Molang expression returning a string to select sound variant (eg: querying an enum entity property).
- Variants has a "map" field which contains key-value pairs of a variant identifier and the sound events it overrides.
- When playing a sound for an entity we first try to calculate their variant and see if that variant overrides the sound event, if not we play the sound form the base entity. If that fails we fall back to the existing logic of running from "defaults".
Example:
Given a mob with the following property
"minecraft:emotional_state": { "type": "enum", "values": [ "neutral", "angry", "happy", "sad" ], "default": "neutral", "client_sync": true }
Sound variants can be played by querying the property:
{ "entity_sounds": { "entities": { "test_mob": { "volume": 1.0, "pitch": 1.0, // The base sounds for various events "events": { "ambient": "mob.test_mob.ambient", "death": "mob.test_mob.death", "step": { "sound": "mob.test_mob.step", "volume": 0.8, "pitch": 1.0 }, "attack": "mob.test_mob.attack" }, "variants": { // Key returning the enum string for variants, can use any Molang expression resulting in a string "key": "query.property('minecraft:emotional_state')", "map": { // If a resulting variant key is not handled here then it will use the base sounds "neutral": { "volume": 1.0, "pitch": 1.0, "events": { // If an event is not handled in a variant then it will use the base sound "death": "mob.test_mob.death.netural" } }, "angry": { "volume": 1.0, "pitch": 1.0, "events": { // Variants can override different events than other variants "death": "mob.test_mob.death.angry", "ambient": "mob.test_mob.ambient.angry" } } } } } } } } }