GUI text entry to create an item via ID

Started by Where_didIcome_from on

Topic category: Help with MCreator software

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
GUI text entry to create an item via ID

Hi! I'm trying to create a GUI that will use a custom item in an input slot and a text entry field to create another item in the 2nd slot based on the previously mentioned text entry field. Basically, you enter an item ID, put 32 of x item into slot 0, and click a button to convert said 32 items into whatever item that corresponds to the ID you have set, dropping it into slot 1. Problem is, I can't figure out how to program it to use the input field as an item entry. I saw a small thread with the same problem, https://mcreator.net/forum/65422/gui-textfield but I can't find the block mentioned in it anywhere, let alone where it's said to be in the thread. Does anyone know how I can execute this?

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
As of now what you are…
Mon, 10/12/2020 - 02:36

As of now what you are trying to achieve is not possible at this current update. I have no further opinions on this matter. Thank you.

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actually, I think you should…
Mon, 10/12/2020 - 13:45

Actually, I think you should be able to do this. I don't know what the "Get block by namespace" block from the other forum is talking about, but I think that you could use an "execute store" commands to get this done. I'll try this out and post a picture of the procedure I come up with.

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright, I have a procedure:…
Mon, 10/12/2020 - 14:23

Alright, I have a procedure:

https://drive.google.com/file/d/13YgzZgsb52nWyIuDJV8PLENx_O8kqog3/view?usp=sharing

Some notes:

  • This actually uses the data merge command, not the execute store command
  • Rounding the xyz position is necessary because otherwise it would have a decimal and Minecraft doesn't like that
  • It's important that all the text blocks are pretty much exactly as they are shown, so here there are in order. Make sure you get all the text inside the " "
    • "data merge block "
    • " " (there's a space in here)
    • " "
    • " {Items:[{Slot:1b, id:""
    • "", Count:"
    • "b}]}"
  • For my GUI, the input slot had an id of 0 and the output slot had an id of 1. If you gave the output slot a different value, you'll need to change the underlined 1 above to that new id.
  • This can allow you to get stacks of normally unstackable items, but it's pretty overpowered anyways so... watch out for that?

Hope this does what you want.

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So exactly where would you…
Mon, 02/26/2024 - 21:06

So exactly where would you use this procedure?

I'm trying to do the same but doesn't look like it's working as intended. But I'm not sure if I was using it correctly. I'm pretty new to mcreator so maybe that's why I might be using it wrong.

I have copied exactly that procedure and I have put it in the GUI procedure trigger "While this GUI is open tick" maybe there's the problem.