mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 20:03:45 +01:00
Performance improvement
This commit is contained in:
parent
8825fb9860
commit
5093f31f28
@ -447,6 +447,7 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
|
|||||||
|
|
||||||
-- ATTACK ENDERMITE
|
-- ATTACK ENDERMITE
|
||||||
local enderpos = self.object:get_pos()
|
local enderpos = self.object:get_pos()
|
||||||
|
if math.random(1,20) == 1 then
|
||||||
local mobsnear = minetest.get_objects_inside_radius(enderpos, 64)
|
local mobsnear = minetest.get_objects_inside_radius(enderpos, 64)
|
||||||
for n=1, #mobsnear do
|
for n=1, #mobsnear do
|
||||||
local mob = mobsnear[n]
|
local mob = mobsnear[n]
|
||||||
@ -458,6 +459,7 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- TAKE AND PLACE STUFF BEHAVIOUR BELOW.
|
-- TAKE AND PLACE STUFF BEHAVIOUR BELOW.
|
||||||
if not mobs_griefing then
|
if not mobs_griefing then
|
||||||
|
Loading…
Reference in New Issue
Block a user