As far as I know, it is reproducable. If I paste in ( example)
$once$
style = $int(Style, 1, 1, 2)$
width = $int(Width, 9, 5, 51)$
height = $int(Height, 9, 5, 51)$
thickness = $int(Thickness, 2, 1, 8)$
block = $blockState(Block, stone_bricks)$
glass = $blockState(Glass, glass_pane)$
seed = $int(Seed, 0, 0, 2147483647)$
local cx = x
local cy = y
local cz = z
if seed == 0 and os and os.time then
math.randomseed(os.time())
else
math.randomseed(seed)
end
local W = math.max(3, math.floor(width))
local H = math.max(3, math.floor(height))
local T = math.max(1, math.floor(thickness))
local function circlePoints(r)
local pts = {}
local ri = math.floor(r + 0.5)
local r2 = r * r
for dx = -ri, ri do
for dz = -ri, ri do
if dx*dx + dz*dz <= r2 then
pts[#pts+1] = {dx, dz}
end
end
end
return pts
end
if style == 1 then
local r = math.min(W, H) * 0.5
local rings = math.max(1, math.floor(r / 3))
for ring = rings, 1, -1 do
local rr = r * (ring / rings)
local pts = circlePoints(rr)
for i = 1, #pts do
local dx, dz = pts[i][1], pts[i][2]
for ty = 0, T - 1 do
setBlock(cx + dx, cy + ty, cz + dz, block)
end
end
end
local spokes = 8
for s = 0, spokes - 1 do
local ang = (s / spokes) * math.pi * 2
local lx = math.cos(ang)
local lz = math.sin(ang)
for dist = 0, math.floor(r) do
local px = math.floor(lx * dist + 0.5)
local pz = math.floor(lz * dist + 0.5)
for ty = 0, T - 1 do
setBlock(cx + px, cy + ty, cz + pz, block)
end
end
end
local glassR = math.floor(r - 1)
local gpts = circlePoints(glassR)
for i = 1, #gpts do
local dx, dz = gpts[i][1], gpts[i][2]
if math.random() > 0.12 then
setBlock(cx + dx, cy + math.floor(T/2), cz + dz, glass)
end
end
else
local lobes = 4
local r = math.min(W, H) * 0.4
for i = 0, lobes - 1 do
local ang = (i / lobes) * math.pi * 2
local ox = math.floor(math.cos(ang) * r + 0.5)
local oz = math.floor(math.sin(ang) * r + 0.5)
local pts = circlePoints(r)
for j = 1, #pts do
local dx, dz = pts[j][1] + ox, pts[j][2] + oz
for ty = 0, T - 1 do
setBlock(cx + dx, cy + ty, cz + dz, block)
end
end
end
local innerR = math.floor(r * 0.7)
local inner = circlePoints(innerR)
for k = 1, #inner do
local dx, dz = inner[k][1], inner[k][2]
setBlock(cx + dx, cy + math.floor(T/2), cz + dz, glass)
end
for dx = -math.floor(r)-1, math.floor(r)+1 do
for dz = -math.floor(r)-1, math.floor(r)+1 do
local d2 = dx*dx + dz*dz
if d2 <= (r + 0.5)*(r + 0.5) and d2 >= (innerR - 0.5)*(innerR - 0.5) then
if math.random() > 0.2 then
setBlock(cx + dx, cy + math.floor(T/2), cz + dz, glass)
end
end
end
end
end
It doesnt work
and then I crash