1
0
Fork 0

fix iron cage size, doubled dragon view range

This commit is contained in:
cora 2022-09-12 01:43:59 +02:00
parent 3dc5b56310
commit 16800b1ac6
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ mcl_mobs:register_mob("mobs_mc:enderdragon", {
{"mobs_mc_dragon.png"}, {"mobs_mc_dragon.png"},
}, },
visual_size = {x=3, y=3}, visual_size = {x=3, y=3},
view_range = 35, view_range = 64,
walk_velocity = 6, walk_velocity = 6,
run_velocity = 6, run_velocity = 6,
can_despawn = false, can_despawn = false,

View File

@ -60,7 +60,7 @@ end
function make_cage(pos,width) function make_cage(pos,width)
local nodes = {} local nodes = {}
local nodes2 = {} local nodes2 = {}
local r = math.min(1,math.floor(width/2) - 2) local r = math.max(1,math.floor(width/2) - 2)
for x=-r,r do for y = 0,width do for z = -r,r do for x=-r,r do for y = 0,width do for z = -r,r do
if x == r or x == -r or z==r or z == -r then if x == r or x == -r or z==r or z == -r then
table.insert(nodes,vector.add(pos,vector.new(x,y,z))) table.insert(nodes,vector.add(pos,vector.new(x,y,z)))