Eating Animation [Fabric]

Eating Animation [Fabric]

7M Downloads

Maybe a way to do foods from different mods?

mrphi06 opened this issue · 4 comments

commented

Maybe a way to do foods from different mods could be something where you just remove a generic part of the model with every "bite". For example, you show a full square of, say, cheese. In the first bite, you render everything. In the second bite, you only render the bottom 3/4. in the third bite, you render the bottom half, etc. This would be only affecting the model of the food. That way, it would also work well with resource packs. I think it would be kind of similar to chisels and bits (I think) they don't hard code every possibility (I think), it is probably more of a "remove X part from model of block"

Example: (4x4 texture?)
[] means a pixel
{} means no pixel

1st "bite":

[][][][]
[][][][]
[][][][]
[][][][]

2nd "bite":

{}{}{}{}
[][][][]
[][][][]
[][][][]

3rd "bite":

{}{}{}{}
{}{}{}{}
[][][][]
[][][][]

I hope this made sense :)

commented

Thank you, this is interesting !

commented

but here's how to implement it 🤔

commented

I have almost no programming experience, (I can kind of do some JavaScript in khan academy, and can do some cool things in scratch lol) but is it possible to just add an overlay and then say do not render the parts with the overlay on? Or say
if there is no overlay: then render,
else: don't?

commented

Maybe a way to do foods from different mods could be something where you just remove a generic part of the model with every "bite". For example, you show a full square of, say, cheese. In the first bite, you render everything. In the second bite, you only render the bottom 3/4. in the third bite, you render the bottom half, etc. This would be only affecting the model of the food. That way, it would also work well with resource packs. I think it would be kind of similar to chisels and bits (I think) they don't hard code every possibility (I think), it is probably more of a "remove X part from model of block"

Example: (4x4 texture?)
[] means a pixel
{} means no pixel

1st "bite":

[][][][]
[][][][]
[][][][]
[][][][]

2nd "bite":

{}{}{}{}
[][][][]
[][][][]
[][][][]

3rd "bite":

{}{}{}{}
{}{}{}{}
[][][][]
[][][][]

I hope this made sense :)

I thought, if the texturepack will change the normal shape of the model (How does the texturepack work with Optifine, when you change the name of an item and it becomes different), then this method will not work normally, but if the normal model of the item does not change, then it will work maybe :Р