ItemStack custom render

Post Reply
kirara_constell
New member
Posts: 1
Joined: Fri Dec 30, 2022 01:25

ItemStack custom render

by kirara_constell » Post

recently came across the need to set a 3d model to be rendered in the ItemStack of the node and not in the positioned node.

Image

with this it would be possible:

1: create chests and other animated nodes (with entities) since we do not have animations for nodes

2: create items with custom 3d models


i know that there are not so direct means of doing these things (they are inefficient on a large scale)

my proposal for this would be(for every stack with the registered name):

Code: Select all

minetest.register_istack_pockerface_render("mymod:mynode",{
    mesh = "mymesh.obj",--or .b3d
    texture = "mytex.png",
})
or(for a specific stack):

Code: Select all

local stack = ItemStack("mymod:mynode 99")
stack.set_pokerface_render({
    mesh = "mymesh.obj",--or .b3d
    texture = "mytex.png",
})
and a parameter for animation would also be cool (it would be based on the time the stack is being rendered) :

Code: Select all

animation = {
    speed: 20,
    snippet: { x=0, y = 12 },
},
example below:
https://youtu.be/2zsKpt004oE

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests