How do I make custom villager trades?

Started by TheTntExpert29 on

Topic category: Help with MCreator software

Last seen on 20:36, 30. Aug 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make custom villager trades?

Hello, I am making a mod where I want to add a villager trade that uses my custom items, How do I make a custom Villager trade with the custom Items with the normal Minecraft Villagers? For the GUI and Mob.

Last seen on 03:12, 31. Jul 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think you need to edit…
Fri, 05/15/2020 - 04:35

I think you need to edit some kind of vanilla loot table for the villagers, not entirely sure how to do that though :/

Last seen on 22:41, 29. Dec 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This will be simple, I’ve…
Fri, 05/15/2020 - 11:59

This will be simple, I’ve made it myself before, 

run a procedure for when right click on entity: open GUI:(the GUI).

And Then the button within the GUI sets of this procedure: If item in slot 0 is “example” Do: set item in slot 1 “example”. 

OR, for two items

item in slot 0 is “example” AND item in slot 1 is “example“ Do: set item in slot 2 “example”.

(keep in mind that the slots have to be going from 0 to 1/2 from left to right)

Last seen on 13:27, 26. Jun 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can u make a tutorial video…
Fri, 06/26/2020 - 12:11

Can u make a tutorial video or explain it better? Please

Last seen on 17:16, 16. Mar 2024
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can also use Mojang's…
Fri, 06/26/2020 - 12:44

you can also use Mojang's vanilla villager AI

Last seen on 10:42, 27. Mar 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Trolmaso And how do I open…
Fri, 07/31/2020 - 05:39

@Trolmaso

And how do I open a procedure for already existing entity?

Last seen on 21:12, 25. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Bananas I'm not entirely…
Fri, 07/31/2020 - 07:22

@Bananas I'm not entirely sure what you mean, but if you are wondering how to access vanilla villager trading, I believe Trolmaso is saying to make and use an entirely new gui that will be replacing the vanilla villager gui. Remaking the vanilla trading recipes in your new gui if you want to keep them.

@Trolmaso please correct me if I'm wrong.

Last seen on 10:42, 27. Mar 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
OK, but sorry, I don't get…
Fri, 07/31/2020 - 12:24

OK, but sorry, I don't get how to make the new GUI replacing the old. I don't know how to work with vanilla mobs and ad the gui to them. Can you please help me again?

Last seen on 21:12, 25. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No problem! Just do this: 1…
Sat, 08/01/2020 - 03:41

No problem! Just do this:

1. Create a new procedure.

2. Set up the procedure to look like this:

Event trigger ... (global trigger): <Player right clicks on entity>

[IF] is <Event/target entity> (sub)type of <EntityVillager>

[DO] open screen for <source entity> pass location <x> <y> <z> GUI: <WhateverYourGuiNameWillBe>

3. Make a new GUI, setting it up however you want it, and put its name in the place of <WhateverYourGuiNameWillBe> in the new procedure

That's it. Whenever you right click on any entity, that procedure will happen and check if the entity you clicked on was a villager. If it was, then it will open the GUI you made. I assume this will make the vanilla villager GUI un-openable, if I understood Trolmaso correctly, as your GUI will open instead.

Last seen on 10:42, 27. Mar 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you very much! And…
Sat, 08/01/2020 - 06:34

Thank you very much! And will this procedure work for all villagers (because that could be problem) or I can set the profession?

Last seen on 21:12, 25. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You're welcome! I could only…
Sat, 08/01/2020 - 08:03

You're welcome! I could only find the entity type "EntityVillager" (though I might have missed the subtypes), so you would probably have to either find out if there is an NBT tag you can call on, or make your own professions unfortunately.

I would definitely recommend looking into how Minecraft sets their villager professions to see if you can "get" their current profession. I will look into it as well and comment if I find anything.

Last seen on 13:33, 17. Aug 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what is source entity in…
Sat, 08/01/2020 - 20:56

what is source entity in procedure ?

Last seen on 21:12, 25. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In thishthis specific…
Sat, 08/01/2020 - 23:27

In thishthis specific procedure, the entity that is clicked on is the "target entity", while the player is the "source entity" because it is the source of the trigger.

Usually, the entity that the procedure is called in is the "event/target entity", but if there is more than one entity being used in the procedure you have to be sure to stop and think which is which.

Mixing these up is one of the most likely culprits of a procedure like this not working.

Last seen on 13:33, 17. Aug 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah but I don't knopw where…
Sun, 08/02/2020 - 14:16

yeah but I don't knopw where to have the pin for the player in the procedure

Last seen on 13:33, 17. Aug 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nvm it's in minecraft…
Sun, 08/02/2020 - 14:19

nvm it's in minecraft components