Jump to content

Recommended Posts

I'm working on a mod that break a stack of stone fruit by one hit of pickaxe, so far it work but I want the pickaxe comsume uses as many as it could to match the stone fruit.

For an example, if I hit a stack of 20 stone fruits with a pickaxe that have 25 uses left, the stone fruits will break and pickaxe will have 5 uses left. If the pickaxe only have 13 uses left, the pickaxe will break and 7 of stone fruits from that stack will left from been break.

I'm pretty sure it will be easy after I get the reference of the pickaxe that player used to mine the stone fruit, but I have no idea how to do it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...