Started by
Lliakos
on
Topic category: Advanced modding
SO i want to make an armor that when you wear the chestplate and then press B a GUI will open
e.g i wear the chestplate and ONLY then i could press B to open the GUI
Edited by Lliakos on Sat, 09/07/2019 - 17:36
Use key binding to open GUI and use if block to check if the player is wearing armor using get item from armor slot procedure block and compare items procedure block.
I suggest you to check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei
how can i check if the player is wearing armor
Player procedures -> Get item from armor slot 0 of player, but change 0 to 2 to check for chestplate. Then compare the item you get with the desired item.
sorry for asking too many questions but i dont speak very good english i get the first one but this:Then compare the item you get with the desired item.No can you explain pls i really wan this to work (sorry for asking these many questions)
also where do i put the get item from armor slot because it doesnt attach to if block
Item from armor belongs in compare items block. I linked tutorials for you, you need to learn things to know how to use them, knowledge does not come from thin air. To see how to compare items or blocks, check this video from the playlist I linked: https://www.youtube.com/watch?v=sSqHjYmiCcE&list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei
This one might help too: https://www.youtube.com/watch?v=MEa0NEPju2s&list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei&index=29&t=0s
ok, First, the videos didnt help me (much) Second,i found a glitch that when you open GUI with input slots and then close it the things that you put drop out and then you cant pick them up
Yes, that is because it is not bound to an inventory. It is not currently possible to do this with non-block GUIs so far as I know.
I know that you can do it but I don't know how
Are you sure? Because I'm fairly certain you can't (not without custom code anyway). We don't have proper slot GUIs for items in Mcreator right now, although there is an issue tracker ticket for it. https://mcreator.net/tracker/issue/475370 so I don't think that your glitch is fixable right now.
When you say they drop out and you can't pick them up, do you mean they disappear, or do you mean there are dropped items floating around that you can't put in your inventory?
Sorry, wrong link: https://mcreator.net/tracker/issue/47537
I mean that I see them floating but I can't pick them up
Ah.. that's interesting.
It's probably easier for Klemen to help you if you open a ticket.
Thank you for the link I appreciate it