跳到主要内容

3.7(国际版 1.21.50)

距离上一次发类似文章时隔半年。在寒假期间,网易将要正式发布 3.7 版本,并将版本进一步推进到 1.21.50。因此,同样地,这里将 1.21.0-1.21.50 的所有更新内容汇总到本文,供查阅本文的开发者参考!

关于网易的 3.7 版本的更新内容,参见3.7 - 我的世界开发者官网。我们在下文仅展示国际版重点更新内容。

:我们仍然只挑出了一些重点内容,涵盖不完全,若有需要,读者可以在中文 Minecraft 查阅!

命令

备注:以下给出的命令都是可以点击的,会自动跳转到我们提供的文档。

新命令或新命令语法

  • /spreadplayers加入了[最高高度: value]参数,以指定随机传送的最高高度:

    /spreadplayers <x: value> <z: value> <实体间距离: float> <最大范围: float> <实体: target> [最高高度: value]
  • /camera加入了一种新的第三人称相机预设minecraft:follow_orbit,称为轨道相机。详情见我们给出的文档(set - 轨道相机)。

    /camera <玩家: target> set minecraft:follow_orbit [朝向] [视角偏移] [实体偏移]
  • /reload加入了[全部: reload_all]参数,指定此参数后将自动退出地图并重进以应用大部分的附加包更改。

    /reload [全部: reload_all]
  • /effect加入了无限时长重载和移除特定状态效果的重载。

    /effect <实体: target> <状态效果: Effect> infinite [放大倍率: int] [隐藏粒子: Boolean]
    /effect <实体: target> clear [状态效果: Effect]
  • /schedule加入了清除队列函数的重载。

    /schedule clear <函数: filepath>
    /schedule on_area_loaded clear function <函数: filepath>
    /schedule on_area_loaded clear tickingarea <名称: string> [函数: filepath]
  • /schedule加入了延迟执行函数的重载,同时加入了清除延迟执行函数的重载。

    /schedule delay add <函数: filepath> <时间: int> [replace|append]
    /schedule delay add <函数: filepath> <时间: int>T [replace|append]
    /schedule delay add <函数: filepath> <时间: int>S [replace|append]
    /schedule delay add <函数: filepath> <时间: int>D [replace|append]
    /schedule delay clear <函数: filepath>
  • 新增了/aimassist,用于修改玩家的瞄准辅助,但是仍为实验性玩法

    /aimassist <玩家: target> clear
    /aimassist <玩家: target> set [x角度: float] [y角度: float] [最远距离: float] [瞄准模式: AimAssistTargetMode] [预设ID: string]
  • 新增了/loot的模拟挖掘重载mine但是仍为实验性玩法

    /loot <目标> mine <目标方块位置: x y z> [<tool>|mainhand|offhand: string]
  • 新增了/place,加入时仅可用于放置地物,但是仍为实验性玩法,并且权限等级为 2,代表此命令不能在命令方块和函数中使用

    /place feature <地物: features> [position: x y z]
    /place featurerule <featurerule: featureRules> [position: x y z]

命令改动

  • 现在/stopsound不再能够停止音乐。
  • 移除了方块状态structure_void_type。在相关命令的应用中需要注意。
  • 移除了/volumearea(此命令最终仍然没能走出实验性玩法)。
  • 加入了一种新的伤害类型mace_smash,可用于/damage
  • 现在游戏规则showRecipeMessages不再被视为作弊内容。
  • 现在/inputpermission支持控制更多输入权限:dismount​jump​lateral_movement​mount​move_backward​move_forward​move_left​move_right​sneak

ID 拆分

物品或方块旧 ID新 ID
铁砧anvilanvil​chipped_anvil​damaged_anvil​deprecated_anvil
墙上的珊瑚扇coral_fan_hangcoral_fan_hang2coral_fan_hang3tube_coral_wall_fan​brain_coral_wall_fanbubble_coral_wall_fan​fire_coral_wall_fanhorn_coral_wall_fan​dead_tube_coral_wall_fan​dead_brain_coral_wall_fan​dead_bubble_coral_wall_fan​dead_fire_coral_wall_fan​dead_horn_coral_wall_fan
蒲公英yellow_flowerdandelion
泥土和砂土dirtdirt​coarse_dirt
虫蚀方块monster_egginfested_stone​infested_cobblestone​infested_stone_bricks​infested_mossy_stone_bricks​infested_cracked_stone_bricks​infested_chiseled_stone_bricks
光源方块light_blocklight_block_0、​light_block_1、​light_block_2、​light_block_3、​light_block_4、​light_block_5、​light_block_6、​light_block_7、​light_block_8、​light_block_9、​light_block_10、​light_block_11、​light_block_12、​light_block_13、​light_block_14、​light_block_15
海晶石及其变种prismarineprismarine​dark_prismarine​prismarine_bricks
石英块及其变种quartz_blockquartz_block、​chiseled_quartz_block​quartz_pillar​smooth_quartz
红砂岩及其变种red_sandstonered_sandstone​chiseled_red_sandstone​cut_red_sandstone​smooth_red_sandstone
沙子和红沙sandsand​red_sand
砂岩及其变种sandstonesandstone​chiseled_sandstone​cut_sandstone、​smooth_sandstone
台阶stone_block_slab2stone_block_slab3stone_block_slab4red_sandstone_slab​purpur_slab​prismarine_slab​dark_prismarine_slab​prismarine_brick_slab​mossy_cobblestone_slab​smooth_sandstone_slab​red_nether_brick_slabend_stone_brick_slab​smooth_red_sandstone_slab​polished_andesite_slab​andesite_slab​diorite_slab​polished_diorite_slab​granite_slab​polished_granite_slabmossy_stone_brick_slab​smooth_quartz_slab​normal_stone_slab​cut_sandstone_slab​cut_red_sandstone_slab
双层台阶double_stone_block_slabdouble_stone_block_slab2double_stone_block_slab3double_stone_block_slab4smooth_stone_double_slab​sandstone_double_slab​petrified_oak_double_slab​cobblestone_double_slab​brick_double_slab​stone_brick_double_slab​quartz_double_slab​nether_brick_double_slabred_sandstone_double_slab​purpur_double_slab​prismarine_double_slab​dark_prismarine_double_slab​prismarine_brick_double_slab​mossy_cobblestone_double_slab​smooth_sandstone_double_slab​red_nether_brick_double_slabend_stone_brick_double_slab​smooth_red_sandstone_double_slab​polished_andesite_double_slab​andesite_double_slab​diorite_double_slab​polished_diorite_double_slab​granite_double_slab​polished_granite_double_slabmossy_stone_brick_double_slab​smooth_quartz_double_slab​normal_stone_double_slab​cut_sandstone_double_slab​cut_red_sandstone_double_slab
石砖stonebricksandstone​chiseled_sandstone​cut_sandstone、​smooth_sandstone
紫珀块及其变种purpur_blockpurpur_block​purpur_pillar​deprecated_purpur_block_1​deprecated_purpur_block_2
cobblestone_wallcobblestone_wall​mossy_cobblestone_wall​granite_wall​diorite_wall​andesite_wall​sandstone_wall​brick_wall​stone_brick_wall​mossy_stone_brick_wall​nether_brick_wall​end_stone_brick_wall​prismarine_wall​red_sandstone_wall​red_nether_brick_wall
彩色火把colored_torch_rg​colored_torch_bpcolored_torch_red​colored_torch_green​colored_torch_blue​colored_torch_purple
海绵和湿海绵spongesponge​wet_sponge
TNT 和水下 TNTtnttnt​underwater_tnt
化合物创建器及其变种chemistry_tablecompound_creator​material_reducer​element_constructor​lab_table
头颅skullskeleton_skull​wither_skeleton_skull​zombie_head​player_head​creeper_head​dragon_head​piglin_head
蘑菇柄——mushroom_stem

物品

备注:以下给出的组件是可以点击的,会自动跳转到我们提供的文档。

物品组件

战利品表

  • 开放了set_potion物品功能,以对箭或药水添加药效。

交易表

  • 自 1.21.30 开始,村民交易表文件已版本化。

方块

备注:以下给出的组件是可以点击的,会自动跳转到我们提供的文档。

方块组件

其它

  • 加入了一个原版方块标签one_way_collidable,用于模拟不会推动碰撞箱内的生物的门、活板门和栅栏门的单向碰撞。
  • 高于格式版本1.21.30blocks.json会认为已被扁平化的方块 ID 是过时 ID(例如:stone_block_slab_4),现在应该使用新版的已扁平化的 ID。
  • 更新了拼图方块。

实体

备注:以下给出的组件是可以点击的,会自动跳转到 Microsoft Learn。

实体组件

实体过滤器

  • 加入了新的实体过滤器owner_distance,用于检查实体与其主人之间的距离。

实体事件

  • 加入了新的实体事件execute_event_on_home_block,以令实体在位于其原点位置的方块上执行事件,但是仍为实验性玩法。目前用于嘎枝。
  • 加入了新的实体事件reset_target,以令实体重置目标。目前用于嘎枝。
  • 加入了新的实体事件play_sound,以令实体播放音效。1.21.50 时用于嘎枝,后续版本还对快乐恶魂、铜傀儡适用。
  • 加入了新的实体事件emit_particle,以令实体释放粒子。目前用于嘎枝。

Molang

ScriptAPI

SAPI 在从 1.21.20 到 1.21.50 的过程中,@minecraft/server的版本从1.11.0升级至1.16.0@minecraft/server-ui的版本从1.1.0升级至1.3.0。以下为这些版本中的功能变化:

另外我是真的很想吐槽,Mojang 写脚本方面的更新日志简直太乱了,让人怀疑他们是不是连 markdown 都不会写。仔细一看就知道他们的更新日志写的真的是一坨,整理起来真的很耗精力!!

系统

  • 运行代码
    • 开放了System.runJob()方法、System.clearJob()方法,用于控制生成器运行。
    • 开放了System.waitTicks()方法,用于控制异步运行。
  • 平台信息检查
    • 开放了MemoryTier枚举,代表内存性能。
    • 开放了SystemInfo
    • 开放了System.serverSystemInfo属性,以获取服务器的信息。

世界

  • 游戏规则:开放了GameRule.ShowDaysPlayed属性和GameRules.showDaysPlayed属性。
  • 世界前事件
    • 世界初始化事件:开放了WorldInitializeBeforeEvent类、WorldInitializeBeforeEventSignal类和WorldBeforeEvents.worldInitialize属性。在该事件中定义自定义物品和方块组件。
    • 玩家与方块交互前事件
      • 开放了PlayerInteractWithBlockBeforeEvent.isFirstEvent属性,以判断这次交互是不是自玩家开始交互以来的第一次交互。
      • 开放了ItemUseOnBeforeEvent.isFirstEvent属性,以判断这次交互是不是自玩家开始交互以来的第一次交互。
      • 开放了WorldBeforeEvents.playerInteractWithBlock属性,玩家与方块交互前触发事件。
    • 玩家与实体交互前事件
      • 开放了WorldBeforeEvents.playerInteractWithEntity属性,玩家与实体交互前触发事件。
  • 世界后事件
    • 方块爆炸事件:开放了BlockExplodeAfterEvent类、BlockExplodeAfterEventSignal类和WorldAfterEvents.blockExplode属性,可监听类似重生锚爆炸的事件。
    • 玩家权限更改事件:开放了PlayerInputPermissionCategoryChangeAfterEvent类、PlayerInputPermissionCategoryChangeAfterEventSignal类和WorldAfterEvents.playerInputPermissionCategoryChanged属性,可监听玩家权限更改。
    • 实体击打方块事件:开放了EntityHitBlockAfterEvent.hitBlockPermutation属性。
    • 玩家播放表情事件:开放了PlayerEmoteAfterEvent类、PlayerEmoteAfterEventSignal类和WorldAfterEvents.playerEmote属性,用于监听玩家播放类似挥手动作的事件。
    • 玩家与方块交互后事件
      • 开放了PlayerInteractWithBlockAfterEvent.isFirstEvent属性,以判断这次交互是不是自玩家开始交互以来的第一次交互;
      • 开放了PlayerInteractWithBlockAfterEvent.beforeItemStack属性,返回在交互前所使用的物品信息;
      • 现在只有成功交互后才会触发后事件,因此空手时不会触发此事件;
      • 开放了ItemUseOnAfterEvent.isFirstEvent属性,以判断这次交互是不是自玩家开始交互以来的第一次交互。
      • 开放了WorldAfterEvents.playerInteractWithBlock属性,玩家与方块交互后触发事件。
    • 玩家与实体交互后事件
      • 开放了WorldAfterEvents.playerInteractWithEntity属性,玩家与实体交互后触发事件。
  • 开放了World.isHardcore属性,用于判断这个世界是否为极限模式。

维度

  • 开放了Dimension.getTopmostBlock()方法和VectorXZ接口,以获取最高处方块。
  • 开放了Dimension.setBlockPermutation()方法和Dimension.setBlockType()方法,以在世界中便捷地放置方块。
  • 开放了Dimension.containsBlock(),检查提供的方块域是否含有特定方块。
  • 开放了Dimension.getBlocks(),获取提供的方块域内特定的方块信息。
  • 方块填充
    • 开放了Dimension.fillBlocks()方法,在提供的方块域内按要求填充方块。
    • 开放了BlockFillOptions接口。
    • 开放了UnloadedChunksError类,在玩家尝试在已加载的区块外填充方块时报错。

方块

  • 方块组件
    • 开放了BlockRecordPlayerComponent类,以获取方块的唱片机性质。
    • 开放了BlockFluidContainerComponent类,以获取液体容器的性质(类似炼药锅)。
  • 自定义数据驱动方块组件
    • 开放了BlockCustomComponent接口。
    • 开放了BlockComponentRegistry类,用于注册自定义方块组件。
    • 开放了BlockComponentStepOnEvent类,用于在实体踏上此方块后执行代码。
    • 开放了BlockComponentStepOffEvent类,用于在实体离开此方块后执行代码。
    • 开放了BlockComponentTickEvent类,用于此方块定期地循环执行代码。
    • 开放了BlockComponentRandomTickEvent类,用于此方块根据随机刻循环执行代码。
    • 开放了BlockComponentEntityFallOnEvent类,用于在实体落到此方块后执行代码。
    • 开放了BlockComponentPlayerInteractEvent类,用于在玩家与此方块交互后执行代码。
    • 开放了BlockComponentPlayerPlaceBeforeEvent类,用于在玩家放置此方块之前执行代码。
    • 开放了BlockComponentPlayerDestroyEvent类,用于在玩家破坏此方块后执行代码。
    • 开放了BlockComponentOnPlaceEvent类,用于在此方块被放下前执行代码。
    • 开放了BlockCustomComponentAlreadyRegisteredError类,当此组件已被注册时报错。
    • 开放了BlockCustomComponentReloadVersionError类,当使用不同脚本版本在重载之间注册自定义方块组件时报错。
    • 开放了BlockCustomComponentReloadNewEventError类,当注册自定义方块组件,该组件实现了新的事件时报错。
    • 开放了BlockCustomComponentReloadNewComponentError类,当在重载之间注册自定义方块组件时报错。
  • 开放了BlockPermutation.getTags()方法和BlockPermutation.hasTag()方法,以获取方块标签。
  • 开放了Block.getRedstonePower()方法,获取方块的充能能量。
  • 方块域
    • 开放了BlockVolume类,以定义方块域。
    • 开放了BlockVolumeIntersection枚举,代表两个方块域的重叠情况。
    • 开放了BlockLocationIterator类,以定义方块域的位置迭代器。
    • 开放了BlockVolumeBase.getBlockLocationIterator()方法,以获取方块域对应的位置迭代器。
    • 开放了InvalidIteratorError类,当迭代器无效时报错。
  • 开放了FluidContainer类。

实体

  • 实体组件
    • 为多个实体组件类的setCurrentValue加入了越界检查。
    • 开放了EntityTameableComponent类,获取实体可被驯服参数。
    • 开放了EntityAgeableComponent类,获取实体长大参数。
    • 开放了EntityLeashableComponent类,获取实体可被栓绳拴住参数。
    • 开放了EntityMovementComponent类,获取实体移动参数。
    • 开放了EntityLavaMovementComponent类,获取实体在熔岩中的移动参数。
    • 开放了EntityMovementGlideComponent类,获取实体滑翔的移动参数。
    • 开放了EntityMovementSwayComponent类,获取实体左右横跳左右移动的移动参数。
    • 开放了EntityUnderwaterMovementComponent类,获取实体在水下中的移动参数。
    • 开放了EntityBreathableComponent类,获取实体呼吸的移动参数。
    • 开放了EntityStrengthComponent类,获取实体承载物品能力的参数(例如驴、羊驼)。
    • 完善了EntityTameMountComponent类,开放tameToPlayer()方法和tamedToPlayerId​tamedToPlayer​isTamed​isTamedToPlayer属性。
  • 开放了Entity.addEffect()方法,以对实体添加状态效果。
  • 完善了EntityRaycastOptions接口,开放ignoreBlockCollision属性、includeLiquidBlocks属性和includePassableBlocks属性。
  • 开放了EntityQueryPropertyOptions接口。

玩家

  • 玩家权限:开放了PlayerInputPermissions类、Player.inputPermissions属性和InputPermissionCategory枚举,以获取玩家的输入权限。
  • 玩家组件:开放了PlayerCursorInventoryComponent类,以获取玩家鼠标光标选取的物品。在移动端不会起作用。
  • 平台信息检查
    • 开放了PlatformType枚举,代表玩家当前所使用的平台。
    • 开放了ClientSystemInfo类,以获取玩家当前所使用的平台信息。
    • 开放了Player.clientSystemInfo属性,以获取玩家客户端的信息。

物品

  • 附魔:开放了EnchantmentTypes.getAll()方法,以获取此物品上的全部附魔。
  • 自定义数据驱动物品组件
    • 开放了ItemCustomComponent接口。
    • 开放了ItemComponentRegistry类,用于注册自定义物品组件。
    • 开放了ItemComponentBeforeDurabilityDamageEvent类,用于在物品损失耐久度前执行代码。
    • 开放了ItemComponentCompleteUseEvent类,用于在此物品使用完成后执行代码。
    • 开放了ItemComponentConsumeEvent类,用于在物品被食用后执行代码。
    • 开放了ItemComponentHitEntityEvent类,用于在用此物品击中实体时执行代码。
    • 开放了ItemComponentMineBlockEvent类,用于在用此物品挖掘方块时执行代码。
    • 开放了ItemComponentUseEvent类,用于在使用此物品时执行代码。
    • 开放了ItemComponentUseOnEvent类,用于在对某个方块使用此物品时执行代码。
  • 开放了ItemTypes类,用于快速获取某个或全部 Minecraft 已有的物品并输出为ItemType

脚本 UI

  • 开放了UIManager类和uiManager对象,以便捷关闭所有玩家的 UI。
  • 开放了ModalFormData.submitButton()方法,以更改 Modal 表单的“提交”按钮文本。

参考文档