Posted September 30, 20195 yr So, here's what I wanna do: I have an item that's supposed to be used with another block that would damage it (if you want specifics, it's supposed to be for Pyrotech's chopping block). I want it so that once the item runs out of durability, it'd transform into another item rather than breaking outright. I can't seem to figure out how I'd do this, though. Here are the things I've tried: Edit the setDamage function. Problem is, there's no method to change the stack's item or get the holder of the itemstack that I've seen, so it wouldn't work. Use onItemUseFinish. It...doesn't seem to fire at all with this. Subscribe to PlayerDestroyItemEvent. This feels too unspecific, and the event might fire when I don't want it to. Is there some way of doing this properly?
September 30, 20195 yr Author Alright, after some testing, it seems that for whatever reason, the chopping block won't trigger PlayerDestroyItemEvent, either. Which is odd, because looking at Pyrotech's code, it seems to use stack.damageItem properly for this. Wonder what's going on...
September 30, 20195 yr Author I guess I'll have to poke the mod author about this one, then. Thanks for the help.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.