Topic category: Help with Minecraft modding (Java Edition)
Hi people, so I'm going to cut the chase.
I need help with a new tree breaking procedure where when the user tries to break the tree, it drops nothing instead. similar to how player gets no drops from breaking stone blocks.
I've currently made a tree breaking procedure but instead of dropping nothing, I made it so that when the player left click log blocks, they will get slowness debuff and self damage unless they use an axe to chop it down. it works but, the debuff still persist for a short duration even when switching to an axe which is kinda annoying.
I'm pretty new with MC modding. so any procedure screenshots would tremendously help. cheers.
below is my current no tree breaking procedure.
Make that, if your conditions are like that, it gives you the damage, the potion effect and replaces the log with another block with the same texture that doesn't drop anithing. On block tick update you make that it replaces every tick with a log. it's not probably the best solution and if the player uses other mods with trees it won't work, but is the best idea i have to solve your problem.
you might have to just remove the block and have it drop nothing. will be a easy way to mine logs but will also punish the player.
just tried this, for some odd reason either the updates from this post or what i did worked. I made this same procedure but put a "cooldown (empty) itemstack for 100 ticks". and on every player tick update it will call this procedure.
updates of mcreator version*
Oddly, In 2024.3, this does not work... At least not exactly. If I hold down the left mouse button, Ill keep mining and eventually get the block but it wont deal more damage.