Started by
rasul
on
Topic category: Help with Minecraft modding (Java Edition)
Hey there, I'm currently creating a mod that adds a 'sling' weapon into the game (i.e. stone sling). The sling is used to shoot projectiles (pebbles). I have gotten everything working but 2 things:
- The sling shoots only if there is a pebble in the player's inventory (same as a bow with arrows). However, I can't figure out how to make it "use" the pebble. Meaning, if you have 1 pebble in your inventory, the sling can shoot infinite (as the # of pebbles in your inventory are never decreased). Is there a procedure to do this?
- I can't figure out how to make the durability lower every time you use the sling. Is there a procedure for this as well?
I can include some screenshots if needed.
Thank you!