Item Nodebox

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Item Nodebox

by jordan4ibanez » Wed Oct 19, 2016 16:24

Is there any way to sneak code into an item's definition to give it a nodebox?
If you can think it, you can make it.
 

User avatar
bigfoot547
Member
 
Posts: 172
Joined: Fri Sep 02, 2016 23:31
GitHub: bigfoot547
In-game: bigfoot547

Re: Item Nodebox

by bigfoot547 » Wed Oct 19, 2016 17:01

Do you mean having the inventory image look like a nodebox?

If so, I have a cheaty way of doing it.
Define a node, then define the item and set the inventory and wield image to the respective images with the node. Example:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("example:node", {
   drawtype = "nodebox",
   tiles = {--[[insert the tiles here--]]},
   paramtype = "light",
   node_box = {
      type = "fixed",
      fixed = {
         {--[[insert the nodebox definition here--]]}
      }
   },
   groups = {not_in_creative_inventory = true}
})

minetest.register_craftitem("example:item", {
   --Insert the definition here
   wield_image = minetest.registered_nodes["example:node"].wield_image,
   inventory_image = minetest.registered_nodes["example:node"].inventory_image,
})

This may or may not work.
It is kind of a cheaty way of doing this.
God's not dead, He's surely alive!
My Stuff | My User Page | Check out my website!
<bigfoot547> I major in existing. | <RedPanda246> Not every day is good, but there is good in every day.
I, bigfoot, have this special ability to destroy cameras and recording devices within a 5 mile radius of myself. Mystery solved.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron