#Missing Grass preset in Script Brush

1 messages · Page 1 of 1 (latest)

fossil basin
#

Hello, I can't find the Grass preset I used to have in my Script Brush. Did it get removed in an update, or did I accidently delete it?
I copied the Lua code from an old YouTube video, but it doesn't work and is not placing any grass at all.

-- Check if target block is air
if getBlock(x, y, z) ~= blocks.air then
    return nil
end

-- Check if a solid block is below
if not isSolid(getBlockState(x, y-1, z)) then
    return nil
end

-- Load custom arguments
local grassiness = $float(Grassiness, 0.5, 0.0, 1.0)$
local do_tall_grass = $boolean(Allow Tall Grass, true)$
local tall_grass = $blockState(Tall, tall_grass)$
local short_grass = $blockState(Short, short_grass)$

-- Base condition for grassiness
if math.random() > grassiness then
    return nil
end

-- Calculate noise values
local simplex = getSimplexNoise(x/12, y/12, z/12)
local white = math.random()
local transformed
if white < 0.5 then
    transformed = math.sqrt(white / 2)
else
    transformed = 1 - math.sqrt((1 - white) / 2)
end```

Thank you.
woeful moss
#

minecraft\config\axiom\tool_presets\script_brush