How would I make a mod with a block that when you interact with it, it shows a formspec and removes the node, but when the player closes the formspec the node re-appears
Code snippet would be appreciated
Modding question
Modding question
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP
- duane
- Member
- Posts: 1715
- Joined: Wed Aug 19, 2015 19:11
- GitHub: duane-r
- Location: Oklahoma City
- Contact:
Re: Modding question
The first part is easy. Just look at chests.lua and replace with air instead of another chest node. Putting the node back could be a problem. I'm not sure if on_receive_fields gets called in every case of a formspec closing. What if the player disconnects with the formspec open?Extex wrote:How would I make a mod with a block that when you interact with it, it shows a formspec and removes the node, but when the player closes the formspec the node re-appears
Code snippet would be appreciated
Believe in people and you don't need to believe anything else.
Re: Modding question
Oh I didn't think of that!
Thanks!
Thanks!
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP
Who is online
Users browsing this forum: No registered users and 13 guests