]> git.lizzy.rs Git - skycraft.git/blob - src/main/god_stick.lua
Changed Join Skyblock Entity
[skycraft.git] / src / main / god_stick.lua
1 local groupcaps = {times = {0, 0, 0}, uses = 0, maxlevel = 3}
2
3 minetest.register_tool("skycraft:god_stick", {
4     description = "God Stick",
5     inventory_image = "mcl_mobitems_blaze_rod.png",
6     range = 100,
7     tool_capabilities = {
8         max_drop_level = 1,
9         groupcaps= {
10             not_in_creative_inventory = groupcaps,
11             oddly_breakable_by_hand = groupcaps,
12             pickaxey = groupcaps,
13             axey = groupcaps,
14             shovely = groupcaps,
15             fleshy = groupcaps,
16             handy = groupcaps,
17         },
18         damage_groups = {fleshy = 65535},
19     }
20 })
21
22 minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage)
23         if hitter:get_wielded_item():get_name() == "skycraft:god_stick" then
24                 lightning.strike(player:get_pos())
25                 minetest.after(0.5, minetest.ban_player, player:get_player_name())
26                 return true
27         end
28 end)
29