How do I make custom villager trades?

Started by TheTntExpert29 on

Topic category: Help with MCreator software

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.

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 :/

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)

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

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?

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.

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?

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.

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?

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.

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 ?

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.

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

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