星空晶体 发表于 2024-8-6 16:03:01

Addon求助:自定义方块无法出现在背包

本帖最后由 星空晶体 于 2024-8-6 16:04 编辑

测试版本:基岩版1.21.2

我自定义了个方块,名称暂没有,命名空间是food_craft:food_crafting

组件添加的都是平常的,其中我添加了一个minecraft:crafting_table组件(让方块可以作为一个工作台)里面我定义的标签是food_crafting,同时也定义了配方与战利品表,里面json我是用工具检查的。在资源包定义了贴图。但进入游戏一看:没有。我还打开了假日创造者,还使用了give指令,但还是没有。



下面是我的Addon文件,大佬帮帮我

花冈柚子 发表于 2024-8-6 16:03:02

看了一下,你写的代码似乎有点问题
-block_definitions | /storage/emulated/0/Android/data/com.mojang.minecraftpe/files/games/com.mojang/minecraftWorlds/CuSxZiQCawA=/behavior_packs/名称 | blocks/food_crafting.json | upgrade blocks/food_crafting.json | minecraft:block | components | Duplicate component minecraft:friction found. Please remove one of the duplicates.

-block_definitions | /storage/emulated/0/Android/data/com.mojang.minecraftpe/files/games/com.mojang/minecraftWorlds/CuSxZiQCawA=/behavior_packs/名称 | blocks/food_crafting.json | upgrade blocks/food_crafting.json |-> minecraft:block -> components -> minecraft:flammable:invalid component

-block_definitions | /storage/emulated/0/Android/data/com.mojang.minecraftpe/files/games/com.mojang/minecraftWorlds/CuSxZiQCawA=/behavior_packs/名称 | blocks/food_crafting.json | upgrade blocks/food_crafting.json | Failed to upgrade to version '1.19.10' from document version '1.16.100'

-block_definitions | /storage/emulated/0/Android/data/com.mojang.minecraftpe/files/games/com.mojang/minecraftWorlds/CuSxZiQCawA=/behavior_packs/名称 | blocks/food_crafting.json | Unexpected version for the loaded data

-recipes/food_crafting_recipe.json | JSON: recipes/food_crafting_recipe.json has an error:
* Line 26, Column 5
Missing '}' or object member name
* Line 23, Column 5
Missing '}' or object member name
* Line 3, Column 3
Missing '}' or object member name

日志文件就是这样写的,你看看哪里需要改改

花冈柚子 发表于 2024-8-6 16:49:43

打开日志文件看看
页: [1]
查看完整版本: Addon求助:自定义方块无法出现在背包