(Tutorial) How to make a Villager with GUI!

Started by IGOR_LIVE96 on

Topic category: User side tutorials

Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(Tutorial) How to make a Villager with GUI!

Hello! Here I am with one more Tutorial!
Today I will teach you how to make a villager who has an inventory (GUI) with functional changes!
Workspace: https://www.mediafire.com/file/jqz3tqcnha4j4jl/Villager_Trade_Tutorial_…

How did I do it?
1 - I used: gold and emerald 32x32 texture and a model of "Traveler Villager (made by me)"

2 - Create your Villager (Type: Creature / AI base: NONE)

3 - Create a procedure to check the item and change in the player's inventory:

If = Has provided entity (item for exchange) in inventory
do = Add "Value" (item result of exchange) to provided players
         inventory
         Remove "Value" (item for exchange) to provided players inventory

4 - Create a GUI using item textures (32x32) and a button to activate the exchange

5 - Finally, create a Procedure to open the GUI:

      Open GUI to provided player. GUI: (select the Villager GUI that
      you created)

We have reached the end of this tutorial, I hope I have helped!
Any questions, leave a comment!

Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks IGOR_LIVE96
Thu, 05/30/2019 - 23:20

Thanks IGOR_LIVE96

Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Klemen, because when I get…
Fri, 05/31/2019 - 18:02

Klemen, because when I get out of the GUI and walk back, does the villager give it back?

Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could analyze what is…
Fri, 05/31/2019 - 20:16

You could analyze what is wrong, the workspace is there for download, the exchange works, but when I open the GUI again, it picks up the golds and returns the emeralds!

As I said the issue is that…
Sat, 06/01/2019 - 10:25

As I said the issue is that you can't bind GUI to entity yet and therefore there are issues with slot management procedures. We plan to add support for inventory to items first, but later to entities too.

Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh then my procedure is…
Sat, 06/01/2019 - 14:01

Oh then my procedure is correct but the error happens because of this!  Okay, I'm glad I'm right!

Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you for your help!
Sun, 07/21/2019 - 15:26

Thank you for your help!

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you!  This was very…
Sat, 08/10/2019 - 16:43

Thank you!  This was very useful.

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to import the file?  
Fri, 05/29/2020 - 18:46

how to import the file?

 

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello ! I can't open your…
Sat, 06/06/2020 - 11:58

Hello ! I can't open your workspace because it is a ".mcr" file and MCreator only wants to open ".mcreator" files :( Can you update the link please ?

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks a lot ;)
Sat, 06/06/2020 - 19:23

Thanks a lot ;)