If player have stack of item in inventory its automatically convert to other item

Started by ntofab on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If player have stack of item in inventory its automatically convert to other item

How to set procedure for example when player have 64 copper coins in inventory it automatically converts to 1 silver coin

 

Any solution? Thanks in advance

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
BUMP any solution?
Wed, 02/08/2023 - 20:49

BUMP any solution?

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried to recreate you idea…
Wed, 02/08/2023 - 21:03

I tried to recreate you idea and made this

It has only been tested a bit so might be a few weird interactions, but i think this is working as it should, try it and see if it works.

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Should also mention that…
Wed, 02/08/2023 - 21:03

Should also mention that this is in the copper coins inventory tick

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ahhh so its about logic gate…
Fri, 02/10/2023 - 19:38

Ahhh so its about logic gate "=" i made it wrong xd now i know how to do that, thanks for help, ure great!

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@edit Now i have trouble to…
Fri, 02/10/2023 - 19:43

@edit

Now i have trouble to make good coin system with villagers, for example: something cost copper coins but u have only silver in eq, how to program it 

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No problem!  What exactly do…
Sat, 02/11/2023 - 02:15

No problem! 

What exactly do you mean, like convetring back silver to copper?

In that case you could add when you rightclick the coin they convert back to 64 copper, removing 1 silver coin.

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
mm, didnt think that through…
Sat, 02/11/2023 - 02:44

mm, didnt think that through, to prevent a loop you could just make it simple and have it so the player needs to rightclick coins to convert them, you could also use a gui, like my old coin mod, you could check it out and see if it gives you insparation maybe.

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I had same idea but there is…
Sat, 02/11/2023 - 19:40

I had same idea but there is over 5 types of coins so it would be tiring to exchange it by right click, i need some script to prevent it to change back when crafting from 64 copper to silver, but after that if player collect again some copper coins it could change to silver again (its hard to explain but i hope u understand :D)

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sadly i think you have to…
Sat, 02/11/2023 - 20:39

Sadly i think you have to scrap the automaticly convert idea and just use rightclick to turn 64 coins to 1, and shift rightclicking to turn 1 into 64 (back to the currency below). Automaticly converting 64 would just cause a loop when trying to make silver to copper.

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hmmm or maybe add key…
Sat, 02/11/2023 - 21:08

Hmmm or maybe add key shortcut to use that tick procedure

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@edit   maybe something like…
Sat, 02/11/2023 - 21:17

@edit

 

maybe something like this (keybind)

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yea, exactly. Guess it…
Sat, 02/11/2023 - 21:38

Yea, exactly. Guess it worked out then?

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Missing dependences and idk…
Sat, 02/11/2023 - 22:29

Missing dependences and idk how to repair it xd

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Key binds dont use "provided…
Sat, 02/11/2023 - 23:45

Key binds dont use "provided itemstack"and other dependensies, activate a global variable when the key is pressed to then do the procedure, should work.