https://www.328377.xyz/neoforge/minecraft1.21.1neoforge%E6%A8%A1%E7%BB%84%E5%BC%80%E5%8F%91/%E4%B8%AA%E4%BA%BA%E6%95%99%E7%A8%8B/Mixin%20%E6%96%87%E6%A1%A3.html #72
Replies: 4 comments
-
|
a |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
我想重新对Player类的ItemStack eat(Level level, ItemStack food, FoodProperties foodProperties)的foodProperties赋值,要怎么办?达到类似以下的效果 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
… ------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2025年9月13日(星期六) 凌晨4:50
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [Jackiexiao/nolebase-template] https://www.328377.xyz/neoforge/minecraft1.21.1neoforge%E6%A8%A1%E7%BB%84%E5%BC%80%E5%8F%91/%E4%B8%AA%E4%BA%BA%E6%95%99%E7%A8%8B/Mixin%20%E6%96%87%E6%A1%A3.html (Discussion #72)
我想重新对Player类的ItemStack eat(Level level, ItemStack food, FoodProperties foodProperties)的foodProperties赋值,要怎么办?达到类似以下的效果
public ItemStack eat(Level level, ItemStack food, FoodProperties foodProperties) {
// 我想混入的逻辑
foodProperties = new FoodProperties();
// 方法原逻辑
xxxxxx;
}
这里只是一个例子,又比如参数是float又要怎么重新赋值?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
👌 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://www.328377.xyz/neoforge/minecraft1.21.1neoforge%E6%A8%A1%E7%BB%84%E5%BC%80%E5%8F%91/%E4%B8%AA%E4%BA%BA%E6%95%99%E7%A8%8B/Mixin%20%E6%96%87%E6%A1%A3.html
记录回忆,知识和畅想的地方
https://www.328377.xyz/neoforge/minecraft1.21.1neoforge%E6%A8%A1%E7%BB%84%E5%BC%80%E5%8F%91/%E4%B8%AA%E4%BA%BA%E6%95%99%E7%A8%8B/Mixin%20%E6%96%87%E6%A1%A3.html
Beta Was this translation helpful? Give feedback.
All reactions