chun__yu
本帖最后由 chun__yu 于 2023-1-19 21:35 编辑


mcmeta文件如上,更改的材质是jack_o_lantern.png,单帧大小是160x160,全图大小160x320,版本1.14.2

以下是游戏内的体现



文件:
图片源文件及log.zip (27.37 KB, 下载次数: 1)





Stone_ingot
本帖最后由 Stone_ingot 于 2023-1-19 20:36 编辑

原版的水也用到了动态纹理,可以打开原版材质看看那里的格式
  1. {
  2.   "animation": {
  3.     "frametime": 2
  4.   }
  5. }
复制代码


静止的水的mcmeta如上,试试把你的按照上面的格式改一下(注意缩进)

chun__yu
本帖最后由 chun__yu 于 2023-1-19 20:41 编辑
Stone_ingot 发表于 2023-1-19 20:34
原版的水也用到了动态纹理,可以打开原版材质看看那里的格式

参考价值不大

Stone_ingot
chun__yu 发表于 2023-1-19 20:39
参考价值不大,原版静水mcmeta文件:
{
  "animation": {

说明你可能把frames那一行删掉就能用了(反正就两帧有没有都一样)

chun__yu
Stone_ingot 发表于 2023-1-19 20:40
说明你可能把frames那一行删掉就能用了(反正就两帧有没有都一样)



不行呢



Stone_ingot
本帖最后由 Stone_ingot 于 2023-1-19 20:56 编辑

等等你的frames是不是应该是[0,1]
不对看错了,不是这个问题

The root tag
animation: Contains data for the animation
interpolate: If true, Minecraft generates additional frames between frames with a frame time greater than 1 between them. Defaults to false.
width: The width of the tile, as a direct ratio rather than in pixels. This is unused in vanilla's files but can be used by resource packs to have frames that are not perfect squares.
height: The height of the tile as a ratio rather than in pixels. This is unused in vanilla's files but can be used by resource packs to have frames that are not perfect squares.
frametime: Sets the default time for each frame in increments of one game tick. Defaults to 1.
frames: Contains a list of frames. Defaults to displaying all the frames from top to bottom.
A number corresponding to position of a frame from the top, with the top frame being 0.
A frame specifies a frame with additional data.
index: A number corresponding to position of a frame from the top, with the top frame being 0.
time: The time in ticks to show this frame, overriding "frametime" above.
wiki里好像说要规定一下每一帧的大小,你看看是不是这个问题

GeForceLegend
在1.14.5 Optifine G5(无Forge/Fabric)环境下无法复现,使用160*320的纹理替换石头并且使用同样的mcmeta。能否提供latest.log以方便查看游戏是否有相关报错,或者直接提供两个原文件以方便测试?


Stone_ingot
GeForceLegend 发表于 2023-1-19 21:26
在1.14.5 Optifine G5(无Forge/Fabric)环境下无法复现,使用160*320的纹理替换石头并且使用同样的mcmeta ...

有没有可能是optifine的原因......

chun__yu
GeForceLegend 发表于 2023-1-19 21:26
在1.14.5 Optifine G5(无Forge/Fabric)环境下无法复现,使用160*320的纹理替换石头并且使用同样的mcmeta ...

感谢提醒,已经补充

GeForceLegend
chun__yu 发表于 2023-1-19 21:36
感谢提醒,已经补充

你发的文件在我这边已经能正常使用了,不过我在看log的时候发现你的mcmeta文件出现过一些应该是json格式的错误。不建议使用记事本编写json文件,如果电脑空间足够可以考虑专门的代码编辑器,vscode之类的自带json语言服务器的还能自动检测json格式错误。

chun__yu
GeForceLegend 发表于 2023-1-19 21:49
你发的文件在我这边已经能正常使用了,不过我在看log的时候发现你的mcmeta文件出现过一些应该是json格式 ...

我发现问题了,是我的动画设置问题,只开动态材质不行,地形动画也得打开(离谱),现在已经正常了。

那么我现在是该申请退回赏金吗



GeForceLegend
chun__yu 发表于 2023-1-19 22:03
我发现问题了,是我的动画设置问题,只开动态材质不行,地形动画也得打开(离谱),现在已经正常了。

那 ...

可以考虑,不过有几个你的mcmeta恐怕是确实用不了的,日志里面实打实的输出了三次json解析错误

chun__yu
GeForceLegend 发表于 2023-1-19 22:06
可以考虑,不过有几个你的mcmeta恐怕是确实用不了的,日志里面实打实的输出了三次json解析错误 ...

其实那个报错应该是我忘了删逗号了

GeForceLegend
chun__yu 发表于 2023-1-19 22:11
其实那个报错应该是我忘了删逗号了

这就是为啥不推荐记事本写json而是推荐代码编辑器,可以避免很多这种格式错误

chun__yu
GeForceLegend 发表于 2023-1-19 22:19
这就是为啥不推荐记事本写json而是推荐代码编辑器,可以避免很多这种格式错误 ...

我有notepad,够用了,总之,谢谢啦