= 创作分享 =
你问我答
1.12.2contenttweaker注册物品报错
10_9_Ostrinia

1.12.2contenttweaker注册物品报错

10_9_Ostrinia 于 2023-5-17 09:25 ( 12月前 ) [复制链接] [只看楼主] [打印]
404 2
70RF
使用常规方法注册物品,然后进入游戏报错,对话框文字(部分,前面的都被顶掉了)如下:






如上图,添加物品的原脚本如下:
#loader contenttweaker

import mods.contenttweaker.Item;
import mods.contenttweaker.VanillaFactory;



var quantum_ingot = mods.contenttweaker.VanillaFactory.createItem("quantum_ingot");
quantum_ingot.maxStackSize = 64;
quantum_ingot.register();

var aperture_steel = mods.contenttweaker.VanillaFactory.createItem("aperture_steel");
aperture_steel.maxStackSize = 64;
aperture_steel.register();

var black_diamond_nugget = mods.contenttweaker.VanillaFactory.createItem("black_diamond_nugget");
black_diamond_nugget.maxStackSize = 64;
black_diamond_nugget.register();

var brevity_steel = mods.contenttweaker.VanillaFactory.createItem("brevity_steel");
brevity_steel.maxStackSize = 64;
brevity_steel.register();

var burium_ingot = mods.contenttweaker.VanillaFactory.createItem("burium_ingot");
burium_ingot.maxStackSize = 64;
burium_ingot.register();
后面32个项都为复制粘贴


最佳答案

查看完整内容

val cotItem as Item = VanillaFactory.createItem("cot_item");
发表于 2023-5-17 09:25:11 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

回复 | 举报

该帖共收到 2 条回复!
卡卡西
val cotItem as Item = VanillaFactory.createItem("cot_item");
发表于 2023-5-17 09:25:12 | 只看该作者

回复 | 举报

10_9_Ostrinia
QQ酱238152 发表于 2023-5-17 09:25
val cotItem as Item = VanillaFactory.createItem("cot_item");

感谢大佬,是Vs的更改所有匹配项功能出了点Bug,里面有三个项不符合语法,感谢解答
发表于 2023-5-17 16:38:14 | 只看该作者

回复 | 举报

百科目前不允许匿名发帖哦~ 请先 [ 登陆 ][ 注册 ] 吧~

本版积分规则

发新帖
  • 回复
  • 点评
  • 评分

[ MC百科(mcmod.cn) 除另有声明,所有开放公共编辑的内容均使用 BY-NC-SA 3.0 协议 ]

Minecraft百科CC协议
快速回复 返回顶部 返回列表