Started by
ntofab
on
Topic category: Help with Minecraft modding (Java Edition)
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
BUMP any solution?
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.
Should also mention that this is in the copper coins inventory tick
Ahhh so its about logic gate "=" i made it wrong xd now i know how to do that, thanks for help, ure great!
@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
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.
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.
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)
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.
Hmmm or maybe add key shortcut to use that tick procedure
@edit
maybe something like this (keybind)
Yea, exactly. Guess it worked out then?
Missing dependences and idk how to repair it xd
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.