MoreMcmeta / core

Animate almost any Minecraft texture with more options. Texture configuration API. 1.16-1.20
GNU Lesser General Public License v3.0
28 stars 5 forks source link

[FEATURE REQUEST] Support boats #23

Closed Oliver-makes-code closed 1 year ago

Oliver-makes-code commented 1 year ago

Is your feature request related to a problem? Please describe. Yes, boats aren't supported

It might be an incompatibility with the Terraform Wood API, I haven't had time to check though

Which Minecraft versions would this feature apply to? 1.19.4+

Additional context I need it for the mod I'm developing image

soir20 commented 1 year ago

Boats should be supported; the issue is likely related to the rectangular shape of the boat texture.

When no frame size is specified, MoreMcmeta assumes the frame is square. This means that textures with rectangular frames will not work correctly if you don't specify a frame size. See the animation format documentation.

Try adding "width": 128 and "height": 64 to the "animation" section of your metadata file. (I'm assuming your frames are 128x64 like the default Minecraft texture.)

For example:

{
    "animation": {
        "width": 128,
        "height": 64
    }
}

Unfortunately, there is not a way to automatically detect the right frame size for rectangular frames.

Please let me know if this does not fix the problem, or close this issue if the problem is resolved.

Oliver-makes-code commented 1 year ago

I already tried it with that, the behaviour with width/height specified is what's shown in the screenshot

Normal Boat:

{
  "animation": {
    "frametime": 300,
    "interpolate": true,
    "width": 128,
    "height": 64,
    "frames": [
      0,
      1,
      0,
      2
    ]
  }
}

Chest Boat:

{
  "animation": {
    "frametime": 300,
    "interpolate": true,
    "width": 128,
    "height": 128,
    "frames": [
      0,
      1,
      0,
      2
    ]
  }
}
soir20 commented 1 year ago

Thanks for clarifying. I will look into this, as boats should be supported. Could you upload logs from a game session where the issue happened?

Oliver-makes-code commented 1 year ago

Here's a log from my development environment: latest.log

Outside of development environment (PrismLauncher): latest.log

Oliver-makes-code commented 1 year ago

Just confirmed this issue on Fabric instead of just Quilt, with only moremcmeta and Fabric API Here's a minimal reproduction resource pack: repro.zip I replace the Oak Boat texture with an animated one

soir20 commented 1 year ago

Thanks for providing the resource pack and logs. You need to use the .moremcmeta extension instead of the .mcmeta extension.

Oliver-makes-code commented 1 year ago

That worked! Thank you!