How to make procedure that gives you item, which name you type in gui textfield?

Started by vlonabuser on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make procedure that gives you item, which name you type in gui textfield?

I had a procedure that does exactly the same thing but it was very very big, and when i switched to 2023.1 it wont let me export my mod because its code too large. it worked perfectly before 2023.1, is there any ways to make it more compact?

So, this procedure was for shop-like gui, and when you type item name in textbar it changes price global variable depending on item, and i have coins with nbt tags (value), you put them in 0 gui slot and if price, item name and value match it will remove 1 item from slot 0 and give you item which name you typed.

Strange that procedure that determines the prices isnt making any compile errors but its same lenght 

pls help

Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
copy your workspace, export…
Wed, 03/29/2023 - 20:05

copy your workspace, export your needed procedures that wont copy over, once those are exported remove them from the workspace and then convert your workspace to 2023.1, once done open your workspace and recreate all the mod elements/procedures you want and open each one and import their respective procedures from the old workspace.

additionally you can create this procedure again from scratch however if you would you would like some player shop procedures I have made a very neat little player shop system with inventories, prices for buying/selling items with different shops for each currency type. you can check out an example of this procedure in a currency mod I made, linked below.

CBJ Economy - Mods - Minecraft - CurseForge