
# -> Farmland
execute if block ~ ~ ~ farmland run \
    advancement grant @s only overly_realistic:advancements/iron_age/crop_connoisseur
execute if block ~ ~ ~ farmland run \
    function overly_realistic:players/items/water_bucket/water_farmland

# -> Cauldron
execute if block ~ ~ ~ cauldron run \
    setblock ~ ~ ~ water_cauldron[level=3]

# -> Campfire
execute if block ~ ~ ~ campfire[lit=true] run \
    setblock ~ ~ ~ campfire[facing=north,lit=false,signal_fire=true]

# -> If player is in creative then return
execute if entity @s[gamemode=creative] run \
    return fail

# -> Replace water bucket
execute if items entity @s weapon.mainhand *[custom_data~{or_bucket_specific:"iron_bucket",or_bucket_contents_type:"water"}] run \
    return run \
        loot replace entity @s weapon.mainhand loot overly_realistic:items/iron_bucket_empty
loot replace entity @s weapon.mainhand loot overly_realistic:items/iron_bucket_empty
