Started by
JPZamps
on
Topic category: Help with Minecraft modding (Java Edition)
I would like the player to only be able to use a certain item if it has the durability above 1, the initial idea was to make the item not break when it reached 0, but it seemed more complicated and just not being able to use it when it reached 0 1 will be enough
So far this is all I've been able to use, I thought it would be able to, but for some reason the item (which has 32 durability) stops working when it reaches 31 durability not 1
I tried a lot but for now I can't think of anything else, any suggestions or ideas?
can you go into minecraft and do the action twice then just have the log from that time also can you place at the front of the procedure a logged message with info as a parameter then write "Ak74 do action start" then add another one in the if statement that says "Fired Ak74" then add an else statement with a log and say "Didn't fire the Ak74" then write after the if else statement make a log that says "Ak74 do action end" then just select between the start and the end in the log and place it in here
I'm sorry but I didn't quite understand what you meant, could you attach an image or something? I'm sorry again
In my example a trigger is used "When block is broken" which you do not need to use, if your procedure is on the "Update Tick" or "When Item is used" of your item.
The Cancel event can be found under the advanced tab in your procedure. What it will do is if your IF condition is false then it will cancel the event that triggers your item. For example if it is a bow and you go to fire it with 1 durability then it will simply cancel the shooting action.
Screenshot ↓
https://i.imgur.com/WsaFLoE.png
hey, I tried your procedure but for me to cancel a global event there has to be one happening, unfortunately there is no way to use this procedure, only it being in '' whem item is used'' or ''item update tick'' appears a message that says a global event must be selected, but I'll still be trying if anyone has another idea