Started by
Takan
on
Topic category: Help with Minecraft modding (Java Edition)
I am making a mod that adds custom foods and tools, and when i was making a custom pickaxe, i wanted to make it mine in a 3x3 area, but i don't know how to make it do that! If anyone knows how to do this, pls help me.
Get block mined by the pickaxe initially x y z then get blocks at x+1 y z, x+1 y z+1 etc. Get the coords for the area you want and destroy the blocks. Replace with air and spawn the item. You would need to get the block at each coord to get the item that needs to drop, unless the pickaxe is only mining stone. If so then make it so the initial block mined has to be stone for the 3x3 mining to happen.
i honestly have been looking for hours and can't find how to get the xyz of the mined block, i'll search up a tutorial but if you could give me any further help, it would be appreciated
thank you for telling me what to do though!
Use trigger when block destroyed by tool. Then use procedure block, block data get block at x y z. The input x y z in that trigger is the x y z of the mined block. Then you can check if block is stone etc and then get block at x+1 y z and so on for your area like I said above and spawn item at each location.