#How do i add an item with animation?

67 messages · Page 1 of 1 (latest)

rugged quest
#

i want to add an item with animation, i already have the spritesheet but don't know how to add

velvet jayBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

rugged quest
south stirrupBOT
#

Paste version of items.js from @rugged quest

rugged quest
#

but i don't know how do i modifi the texture

#

after i create it

#

im guessing i should do something on client events

indigo granite
#

you need an .mcmeta file, which will be named [item_name].png.mcmeta, with [item_name] of course being replaced with the name of the item

rugged quest
#

oh, and it needs to be horizontal strip or vertical strip?

indigo granite
#

vertical

rugged quest
#

and how do i save something as a .png.mcmeta? i just rename it as that?

indigo granite
#

yeah

rugged quest
#

cuz if see the archive it just says file png

indigo granite
#

do note, this will store things in plain text, so probably use a .txt file as a base

rugged quest
#

oh, ok

#

but how do i transform an image into.txt file?

indigo granite
#

uh, you can probably just rename the extension

#

but don't do that

#

you need both the .png and .mcmeta file to make it animate

rugged quest
#

like that?

indigo granite
#

the .mcmeta will basically be a JSON-formatted set of parameters for the game to use to transform the image

rugged quest
#

but it just ends as .png.mcmeta.png

indigo granite
#

do you have file extensions enabled in your file explorer

rugged quest
#

what is that?

indigo granite
#

on some OSes, by default, you can't see the part of a file's name that says and defines what type of file it is

#

what OS are you on?

rugged quest
#

windows 10

indigo granite
#

if you go into a file explorer window, there should be one tab option that says View, or Home

rugged quest
#

oh i see now

indigo granite
#

one of those two, i honestly' can't recall, but among the options at the top bar, more towards the right, there should be some checkboxes

rugged quest
#

i managed to rename it, i'll reopen my minecraft to see if it worked

#

didn't work

south stirrupBOT
#

Paste version of enderium_mechanism.png.mcmeta from @rugged quest

rugged quest
south stirrupBOT
#

Paste version of items.js from @rugged quest

indigo granite
#

you don't take the png file and rename it

#

you have the png file, and another file that is the mcmeta

rugged quest
#

wdym?

patent light
#

make your png a normal png file again

#

and create a new file with the file name of your png file with .mcmeta at the end

rugged quest
#

like that?

indigo granite
#

just about

patent light
#

uh no

indigo granite
#

but because reasons, it would be enderium_mechanism.png.mcmeta

patent light
#

create a text file

indigo granite
#

o, well yeah

patent light
#

not a png

indigo granite
#

the filename is right, but the base type uh, not really

#

the mcmeta file is like a set of instructions, that's the simplest way to put it

rugged quest
#

this way?

patent light
#

hold on

indigo granite
#

nearly there

#

png instead of txt

#

just rename it and change that out

patent light
#

then put this in there json { "animation": { "frametime": 2, "interpolate": false } }

#

put it in the same folder as your texture and reload textures with f3+t

south stirrupBOT
#

Paste version of enderium_mechanism.png.mcmeta from @patent light

rugged quest
#

i got it!

#

thanks

patent light
#

poggers

#

??closeticket

south stirrupBOT
# patent light ??closeticket

Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.

Do you have any other questions regarding your issue? Feel free to ask!
Note: You generally should create a new post for unrelated issues.