[1.16.5]Capability如何应用到Item上 #118
Answered
by
3TUSK
KeNickGong
asked this question in
Q&A
-
Capability似乎只能attach到ItemStack上,如果我的一个item想要实现Capability,赋予这个item一些额外的参数(比如一个魔杖储存的法力值),该如何实现? |
Beta Was this translation helpful? Give feedback.
Answered by
3TUSK
Jul 26, 2021
Replies: 1 comment
-
不可能,法力值应该保存在 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
KeNickGong
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
不可能,法力值应该保存在
ItemStack
上。Item
只是决定物品类型用的。Item
不决定法力值这种可变数据。