apple7032
运行路径“/datapack/数据包名称/data/custom/functions/example/test.mcfunction”中的函数:/function custom:example/test

从wiki上的来看  1.13 function文件的位置好像和 1.12 有点区别

我又有点没看懂wiki里的“数据包名称”实际情况下表示什么
我按相似的命名方式整理了一下存档里的文件夹  用相同的命令在游戏中也是未知的函数


求大佬指点一下

lirui11
应该是datapacks文件夹(不会是你手滑打错了吧)

路径改成这样试试
/datapacks/数据包名称/data/custom/functions/example/test.mcfunction”
输入/datapack list看看你的数据包是否成功加载 并检查test函数是否有语法错误(建议写个say 123来测试)

apple7032
lirui11 发表于 2019-2-16 21:12
应该是datapacks文件夹(不会是你手滑打错了吧)

路径改成这样试试

那段我从wiki上复制的,估计是wiki打错了
我的目录:.minecraft\saves\红石实验室\datapacks\command\data\custom\functions\example
最里面的是一个.mcfunction

我没动那个dataparks文件夹  就是往里边塞东西而已
加载了一下 只有一个默认数据包vanilla  应该是没成功

SPGoding
.minecraft/saves/红石实验室/datapacks/command/pack.mcmeta


代码:

  1. {"pack_format":1,"description":""}

apple7032
SPGoding 发表于 2019-2-16 22:25
.minecraft/saves/红石实验室/datapacks/command/pack.mcmeta

文件格式不是.mcfunction了?还有下面那行是啥

apple7032
SPGoding 发表于 2019-2-16 23:28
1.13.2,函数不能直接用,要放到数据包里面。

数据包创建的第一步,是在它的下面建立一个 pack.mcmeta 文 ...
读取你之前写好的 mcfunction 函数

那mcfunction应该放在哪里

SPGoding
apple7032 发表于 2019-2-16 23:34
那mcfunction应该放在哪里

.minecraft\saves\红石实验室\datapacks\command\data\custom\functions\example.mcfunction
在游戏中用 custom:example 运行


.minecraft\saves\红石实验室\datapacks\command\data\custom\functions\dir\example.mcfunction
在游戏中用 custom:dir/example 运行

第一页 上一页 下一页 最后一页