Changing modes of a tool

Started by madcock83 on Wed, 09/04/2019 - 16:23

Topic category: Help with modding

Last seen on 14:10, 1. Dec 2019
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Mods of the week:
  • Forum topics:
  • Comments:
  • Wiki pages:
  • Tracker tickets:
  • Invalid tickets:
Changing modes of a tool
Wed, 09/04/2019 - 16:23

Im sure its been asked but i cant find it. 
I have a tool, call it a pickaxe.  It works like a normal pickaxe.  but if it runs across a certian ore it does something else.  it also works as a 3x3x1 hammer.  All that works as it should
but what i would like to do is have the user Shift right click to make it act as a hammer and shift right click back to a normal pickaxe.  I made 2 different tools that looked alike and made it where if you shift right click it removed one and added the other.  but it never seems to go into the same slot.  and if something is in the slot next to the tool it just disappears.  

is there a way to make it do one thing, then shift click and do the other and then shift click again to go back.  simple changing mode type of thing?
thanks

 

0Upvote this forum topic
Last seen on 08:26, 28. Feb 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Mods of the week:
  • Forum topics:
  • Comments:
  • Wiki pages:
  • Tracker tickets:
  • Invalid tickets:
You could do this using…
Wed, 09/04/2019 - 18:01

You could do this using procedures and store the current mode of the tool/item in the NBT variable.

0Upvote this forum topic
Last seen on 14:10, 1. Dec 2019
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Mods of the week:
  • Forum topics:
  • Comments:
  • Wiki pages:
  • Tracker tickets:
  • Invalid tickets:
I think i see where youre…
Wed, 09/04/2019 - 18:32

I think i see where youre going with it, but i dont know enough about the NBT stuff 

0Upvote this forum topic