1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
core.register_node("permflightpotion:permflightpotion",{
description = "Permanent Flight Potion",
drawtype = "plantlike",
tiles = {"ethereal_flight_potion.png"},
inventory_image = "ethereal_flight_potion.png",
wield_image = "ethereal_flight_potion.png",
paramtype = "light",
sunlight_propagates = true,
selection_box = {
type = "fixed", fixed = {-0.2, -0.37, -0.2, 0.2, 0.31, 0.2}
},
groups = {dig_immediate = 3, vessel = 1},
sounds = default.node_sound_glass_defaults(),
on_use = function(stack,player)
local name = player:get_player_name()
local privs = core.get_player_privs(name)
if privs.fly then return end
privs.fly = true
core.set_player_privs(name,privs)
stack:take_item(1)
return stack
end,
})
|