NameDefault ValueTypeDescription value not set String Set the display name for an item. Example JSON 复制 "minecraft:display_name":{ "value": "secret_weapon" } Example Using Localization Key JSON 复制 "minecraft:display_name":{ "value": "item.snowball.name" } 反馈...
首先我们需要在”data/modid“(modid为你数据包的id)内新建一个loot_tables文件夹,在loot_tables文件夹内新建一个item.json文件(item为你需要注册的物品id,只能是英文小写、数字和下划线),这里以钢锭为例: {"pools": [{"rolls": 1,"entries": [{"type": "minecraft:item","name": "minecraft:iron_ingot...
在新建的 json 文件中输入如下内容: {"format_version":"1.19.11","minecraft:item":{"description":{"identifier":"wi:resonant_rough","category":"items"},"components":{"minecraft:icon":{"texture":"resonant_rough"},"minecraft:display_name":{"value":"共鸣水晶原石"}}} format_verson: 指定制作...
execute as @a[nbt={Inventory:[{Slot:0b,id:"minecraft:command_block",Count:1b}]}] run item replace entity @s inventory.0 with stone 1如果要实现在背包任何一格都替换,则需要36个命令方块指定每一格,常见操作是提示指定某一格子,或者指定某一容器的某一格,无法实现一条命令检测所有格子。本人Java ...
C:/scoreboard players tag @e[type=Item] add tp {OnGround:1b,Item:{id:"minecraft:nether_star",Count:1b,tag:{display:{Name:传送,Lore:["红石研究所制造"]}}}T:给所有在地上的,名字叫传送的,注释是红石研究所制造的下界之星添加一个叫tp的标签(还真长)———右ccb:A:1R:0C:/execute @e[t...
如图所示在正确的位置创建 en_us.json, your_item_name.json, 其中的your_item_name.png一会儿再说。 代码语言:javascript 复制 //en_us.json{"item.test.maple":"Maple"} 这应该相当于是一个mapping。这里的”Maple”是在游戏中显示的名称,而前面的”maple”则是代码中的名称。
{Item:{id:#,Damage:#, Count:#,tag:{“物品的数据标签”}}} ench 使那个物品被附魔。 有那个附魔的id以及附魔的等级(lvl)。 能够制定只有1个附魔还是多个附魔。 id, lvl 所有 {ench:[{id:#,lvl:#}, {id:#,lvl:#}]} display Name:用作增加自定义的名称 color:颜色(皮革装备) Lore:以及为物品提...
可以使用Type和name来检测。这里我们是用Type,如果想用Name 用String的比较方式看看是否一样就可以了。 if(e.getCurrentItem().getType()==Material.DIAMOND_CHESTPLATE){} 我们需要对玩家进行操作,在这个事件里,玩家是getWhoClicked Playerplayer=e.getWhoClicked(); ...
因此@e[type=item,nbt={Item:{id:"slime_ball"}}]找不到任何东西,因为 id字段始终包含一个已经被转换的命名空间ID字符串。 通过进度选择目标[仅Java版] 从Java版1.13开始,目标选择器支持advancements参数,取代/advancement test。参数名称是进度的IDadvancements后接一组用中括号包含来的键值对,其中键为进度或条件...
Zero-based index of the slot to transfer an item to, ontoContainer. toContainer:Container Target container to transfer to. Note this can be the same container as the source. Notes: This function can't be called in read-only mode.