Cobwebs (like in MC)

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

Cobwebs (like in MC)

by TenPlus1 » Mon Jun 09, 2014 17:15

For anyone looking to add minecraft-like cobwebs to their mods, here's a way to register a node which will slow users down when walking through it:

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("mod:cobweb", {
   description = "Cobweb",
   drawtype = "plantlike",
   visual_scale = 1.1,
   tiles = {"cobweb.png"},
   inventory_image = "cobweb.png",
   paramtype = "light",
   sunlight_propagates = true,
   liquid_viscosity = 7,
   liquidtype = "source",
   liquid_alternative_flowing = "mod:cobweb",
   liquid_alternative_source = "mod:cobweb",
   liquid_renewable = false,
   liquid_range = 0,
   walkable = false,
   groups = {snappy=1,liquid=3},
   drop = "farming:string",
   sounds = default.node_sound_leaves_defaults(),
})

minetest.register_craft({
   output = "mod:cobweb",
   recipe = {
      {"farming:string", "farming:string", "farming:string"},
      {"farming:string", "farming:string", "farming:string"},
      {"farming:string", "farming:string", "farming:string"},
   }
})
Attachments
cobweb.png
cobweb.png (144 Bytes) Viewed 100 times
 

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 4 guests

cron