mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
Make gateway enderpearl teleports easier
This commit is contained in:
parent
c451866a36
commit
6e2a7c8a7e
1 changed files with 5 additions and 0 deletions
|
@ -105,6 +105,11 @@ minetest.register_abm({
|
||||||
if preparing[minetest.pos_to_string(pos)] then return end
|
if preparing[minetest.pos_to_string(pos)] then return end
|
||||||
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 1)) do
|
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 1)) do
|
||||||
if obj:get_hp() > 0 then
|
if obj:get_hp() > 0 then
|
||||||
|
local luaentity = obj:get_luaentity()
|
||||||
|
if luaentity and luaentity.name == "mcl_throwing:ender_pearl" then
|
||||||
|
obj:remove()
|
||||||
|
obj = luaentity._thrower
|
||||||
|
end
|
||||||
teleport(pos, obj)
|
teleport(pos, obj)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue