How can I replace ethereal:green_dirt with default:dirt?

wb9688
New member
 
Posts: 1
Joined: Sun Apr 17, 2016 06:09
GitHub: wb9688
IRC: wb9688
In-game: wb9688

How can I replace ethereal:green_dirt with default:dirt?

by wb9688 » Sun Apr 17, 2016 06:25

I have a (sqlite) world. I uninstalled Ethereal. Ethereal had replaced lots of default:dirt with ethereal:green_dirt. How can I replace all the ethereal:green_dirt with default:dirt (so it's back to before I installed Ethereal)?
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: How can I replace ethereal:green_dirt with default:dirt?

by TenPlus1 » Sun Apr 17, 2016 07:36

Plop this code into a separate mod and let it run, it will replace the ethereal dirt with normal:

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_abm({
   nodenames = {"group:ethereal_grass", "ethereal:dry_dirt"},
   interval = 1,
   chance = 1,
   action = function(pos, node)
      if node.name == "ethereal:dry_dirt" then
         minetest.set_node(pos, {name = "default:dirt_with_dry_grass"})
      else
         minetest.set_node(pos, {name = "default:dirt_with_grass"})
      end
   end,
})
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 11 guests

cron