For this week's Snapshot, we've made improvements to the Decorated Pots!
在本周的快照更新中,我们对饰纹陶罐做出了改进!
Additionally, Realms is now available in Snapshots moving forward! Any player who has an active Realms subscription is eligible to create a free Snapshot Realm. This Snapshot Realm will be separate from your regular Realm to prevent any issues from impacting your regular Realm. For more information on how Snapshot Realms work, please see Realms in Minecraft: Java Edition Snapshot FAQ .
另外,从现在开始,Realms 也支持快照版世界了!任何当前订阅了 Realms 的玩家都可免费创建一个快照版本的 Realm。快照版本 Realm 服务器会与你的常规 Realm 服务器相互独立,从而防止对后者产生影响。如想知道更多有关快照版本 Realms,可以查看 Minecraft: Java Edition Snapshot FAQ。
NEW FEATURES 新特性
SNAPSHOT REALMS 快照版本 REALMS 服务
Realms is now available in Snapshots, Pre-Releases, and Release Candidates
Realms 服务现支持快照、预发布版和候选版本
The version of the last played world on a Realm is displayed in the Realms list
在 Realms 列表中将展示每个 Realm 服务器最近一次游玩世界的版本
Experiments are available for newly created worlds
创建新的世界时,可以使用实验性选项
CHANGES 更改
Decorated Pots can now store items, and can be smashed by projectiles
饰纹陶罐现在可以储存物品,但会被弹射物破坏
DECORATED POTS 饰纹陶罐
Decorated Pots now store up to a single stack of items
饰纹陶罐现可储存 1 组物品
Hoppers, Hopper Minecarts and Droppers can now insert and/or extract items from Decorated Pots
漏斗、漏斗矿车可以从饰纹陶罐存取物品,投掷器可以向饰纹陶罐存入物品
Comparators can now read the number of items in Decorated Pots
红石比较器可以读取饰纹陶罐内物品的数量
Players can interact with Decorated Pots to insert items into them
玩家可通过与饰纹陶罐交互来存入物品
Decorated Pots have no GUI, and need to be broken to retrieve or discover their content by players
饰纹陶罐没有 GUI,需要被打破才能发现并取出内容物
Player interactions with Decorated Pots cause the Decorated Pot to wobble and trigger the vibration frequency of 11
玩家与饰纹陶罐的互动将导致饰纹陶罐晃动(暂译),并发出频率为 11 的振动
Decorated Pots can be smashed by projectiles which cause them to shatter and drop their content
We want to hear your feedback on these improvements to Decorated Pots - let us know what you think in our dedicated feedback site post!
我们想要听到你们对饰纹陶罐改进的反馈 —— 请将你的想法发送到我们专门设置的反馈征集帖!(可能无法访问)
TECHNICAL CHANGES 技术性更改
The Data Pack version is now 20
数据包版本现在为 20
The name of non-living entities will now be shown if looked at and a CustomName is set, or always displayed if CustomNameVisible is set, similar to living entities
That means function command will no longer return (or even display) number of commands run during execution
这意味着 function 命令将不再返回(甚至显示)执行期间运行的命令数
Error conditions:
错误情况:
Calling non-existent function
调用了不存在的函数
Calling empty function tag
调用了空的函数标签
Macro instantiation failure
宏函数实例化失败
"Result" in this context means values that would be stored with execute store
在本文此处以及前后的“返回值”均指代可通过 execute store 进行储存的值
The previous behavior where every command in function would perform store if a function was called with execute store ... run function is removed
此前若函数被 execute store ... run function 调用,则函数在运行每一条命令都会执行一次 store 子命令
That means that a single call to function will store at most once (zero times if return was not called)
这意味着单次 function 调用将会至多执行 store 子命令一次(在没有调用 return 的情况下是 0 次)
For function tags with multiple entries, function results will be accumulated, but partial results will be stored at the end of every function
对于有多个函数的函数标签,函数返回值会被累计,在每一函数执行完毕时更新一次
Limits
限制 Existing limits for functions have been refined to accomodate new execution rules and prevent wider range of exploits:
现有对函数的限制已被做出改进,从而适应全新的执行规则,同时为了预防更大范围的漏洞:
Limits apply even if run from command line (so it will now always behave as if they were placed in a function)
即使通过命令行执行的函数也将受到限制(现在会表现地与使用 function 时的行为完全相同)
For example, all functions called by execute as @e run function will count towards same limit
举例说明,所有使用 execute as @e run function 调用的函数会共用同一个计数器
Executions from command blocks still count as separate ones
使用命令方块的执行行为仍会被单独考虑
Limit maxCommandChainLength for functions will now count "operations" like:
对函数的 maxCommandChainLength 限制也会对以下类型的“操作”进行计数:
execution of command for a single context
为单个上下文(context)执行的命令
execution of a stage in execute (no matter how many contexts were modified)
execute 命令执行的单个阶段(无论有多少上下文被修改)
invocation of function
函数调用
New limit with game rule maxCommandForkCount now restricts total amount of context that can be created by single state of functions like execute
Example: if there are 5 entities in world, execute as @e creates 5 contexts, while execute as @e at @e creates 5*5 = 25 contexts
举例说明:若当前世界存在 5 个实体,则 execute as @e 会创建 5 个上下文,而 execute as @e at @e 会创建 5 乘 5 共 25 个上下文
EXECUTE IF FUNCTION EXECUTE IF FUNCTION
An execute sub-command that runs a function or function tag and matches the return value(s).This is a reintroduction of functionality removed in previous version.If a tag is given, all functions run regardless of the results of prior functions.
全新的 execute 子命令,可运行函数或函数标签控制的一组函数,并匹配返回值。这一子命令在先前的版本中被移除,但现在被重新加入。若使用函数标签,则每一个函数都会被执行,与上一个返回值无关。
Syntax:execute if|unless function <function> <continuation>
格式:execute if|unless function <function> <continuation>
Parameters:
参数:
function: The function or tag to run
function:要运行的函数或函数标签
Matching
匹配值
The matching of the result value of the function(s) that run:
所运行函数的输出值将按以下规则匹配:
At least one of the functions must succeed for the match to succeed
要让匹配的结果为成功,则至少一个函数要成功运行
A succeessful call is defined as a function that:
函数的成功调用必须满足:
Uses the return command to return a value
使用了 return 命令来返回一个值
The return value is not 0
返回值不为 0
If no functions exited with return, neither if or unless will run
若没有函数使用了 return,则 if 或 unless 都不会通过
RETURN RUN RETURN RUN
A form of the return command is now available, return run .This is a reintroduction of functionality removed in previous version.
在 return 命令中现在可以使用 return run 的子命令格式。这一子命令在先前的版本中被移除,但现在被重新加入。
Syntax:return run <command>
命令格式:return run <command>
This takes the result value from running the specified command and returns that as the return value of the function.
该命令将会运行由 command 参数所指定的命令,并获取其输出的 result 值,然后作为函数的返回值输出。
If command did not return any value (like, for example, call to a function without return), return will not execute and function will continue execution
若该命令没有返回值(例如使用 function 调用了函数,但函数内没有 return 命令), return 命令将不会被执行,但函数仍会继续执行
If the given command fails, the return value is 0
若命令执行失败,则返回值为 0
In all other aspects, it works like return with a specified return value
在其他情况下,它与 return 并无区别,也会有特定的返回值
In case of fork (for example return run execute as @e run some_command) the first execution of the command will return
如果命令存在分支情况(例如 return run execute as @e run <特定命令>),则只会按命令的第一次执行输出返回值
If there are no executions (for example in return run execute if @e [something_impossible] run some_command) function will not return and will continue execution
若命令没有被执行(例如 return run execute if @e [<不会被通过的选择器>] run <特定命令>) ,则函数不会有输出值,但仍会继续执行
FIXED BUGS IN SNAPSHOT 23W41A 快照 23W41A 修复的漏洞
MC-16937 - Shooting an arrow into the nether portal can hurt anybody when PvP is disabled
MC-265516 - The "Cancel" button within some realms menus can be deselected using keyboard navigation despite it being the only element within the said menu