Posted May 29, 201510 yr I am making a mod in minecraft 1.8, and one thing it can do is that when you right click and hold it. It will 'charge' the item and do a different action then it would do if you just simply right clicked. I want the user to know when it is done charging, and I thought that a that little ding caused by a arrow hitting a player would be perfect. However, I can't figure out how to do this. I tried using NBT as a way to store how much time is left for charging and whether or not it has played a sound effect. But that way doesn't work, as it just resets the timer because a different NBT tag makes MC think its a different item. So any idea what I could? Note, the charge time is configurable. So the charge time in the client's configs might be different in the server's config.
May 29, 201510 yr Author I looked into using getItemInUseCount. Problem with that is that is that is @SideOnly(Side.CLIENT), which if I remember right. Means that function doesn't exist server side, and the server is where the actual time needed to charge the item is stored.
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.