Topic category: Help with modding (Java Edition)
I've been looking for a way to check for a block at a relative position to another and copy it into an inventory. It's for a drill-like block that breaks the block next to it and puts it inside a slot in the drill. I'm having trouble figuring out a way to do this without having to check for every specific block, like "If block at y+1 = stone, insert stone in slot 0". That would be inefficient and tedious. What I want is something like "if block at y+1 is solid, set get block at y+1 in slot 0 of inventory". After watching a few tutorial videos and searching topics on the forum, I haven't found an answer yet. If anyone knows if this is possible and/or how to do it please let me know. I really appreciate it, and if I figure it out on my own, I will make sure to post the solution either on this thread or another forum section. Thank you!