= 创作分享 =
你问我答
求助1.18.2Crt按教程写改属性报错
假的大佬QAQ

求助1.18.2Crt按教程写改属性报错

假的大佬QAQ 于 2023-8-29 03:33 ( 8月前 ) [复制链接] [只看楼主] [打印]
333 0
50RF
按着https://docs.blamejared.com/1.18 ... redient/IIngredient写了修改物品属性的,结果不断地报错说No Such a symbol:attribute,明明是按着教程写的到底是什么问题啊,编写如下

import crafttweaker.api.ingredient.IIngredient;
import crafttweaker.api.entity.attribute.AttributeOperation;

IIngredient.addGlobalAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation, slotTypes as MCEquipmentSlotType[]);
<item:minecraft:diamond_sword>.anyDamage().addGlobalAttributeModifier(<attribute:minecraft:generic.attack_damage>,"cb3f55d3-645c-4f38-a497-9c13a33db5cf", "a", 100, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:mainhand>]);

发表于 2023-8-29 03:33:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

回复 | 举报

该帖共收到 0 条回复!
百科目前不允许匿名发帖哦~ 请先 [ 登陆 ][ 注册 ] 吧~

本版积分规则

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

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

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