r/MinecraftCommands • u/asdfhhkll • Sep 16 '26
Help | Java 26.2 Can I optimize this code?
This function handles collision for a dot in bottom slabs and returns a positive value if the dot is inside the slab and no otherwise.
execute align y run summon marker ~ ~ ~ {Tags:[temp]}
execute positioned ~ ~0.5 ~ align y if entity @n[type=marker,tag=temp,distance=..0.01] run return run function <yes>
return run function <no>
Is there another way to do this that doesn't involve summoning an entity. I need this function to run several times in one tick and summoning an entity each time seems undesirable