mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
make bottle o enchanting activate target
This commit is contained in:
parent
d89687984b
commit
096d46152e
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
|
local mod_target = minetest.get_modpath("mcl_target")
|
||||||
|
|
||||||
minetest.register_entity("mcl_experience:bottle",{
|
minetest.register_entity("mcl_experience:bottle",{
|
||||||
textures = {"mcl_experience_bottle.png"},
|
textures = {"mcl_experience_bottle.png"},
|
||||||
hp_max = 1,
|
hp_max = 1,
|
||||||
|
@ -30,6 +32,9 @@ minetest.register_entity("mcl_experience:bottle",{
|
||||||
vertical = false,
|
vertical = false,
|
||||||
texture = "mcl_particles_effect.png^[colorize:blue:127",
|
texture = "mcl_particles_effect.png^[colorize:blue:127",
|
||||||
})
|
})
|
||||||
|
if mod_target and n == "mcl_target:target_off" then
|
||||||
|
mcl_target.hit(vector.round(pos), 0.4) --4 redstone ticks
|
||||||
|
end
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue