carpetplacer: type: world debug: false events: on player right clicks !air with:*_carpet: - define target # "direction" gives north, south, etc. and "vector" gives a vector object, while "xyz" converts it to coordinates. So output is sth. like .add[0,0,1] - define placeloc <[target].add[]> - if <[placeloc].material.name> != air: - stop - else: - modifyblock <[placeloc]> no_physics - playsound sound:block_wool_place - if == survival: - take iteminhand quantity:1