Started by
loressa
on
Topic category: Help with Minecraft modding (Java Edition)
Can someone do a tutorial or explain how to do mob trades with the UI bound to a mob - like villager trades? This is for the latest version 2020.4.
I'm just asking for something simple, not complicated like the one done by NorthWestTrees Gaming on YouTube. By simple, I mean the mob has an input slot where you put an item to get another item in their output slot.
Cheers.
Check
https://www.youtube.com/watch?v=0_eqw9VAl3I&list=PLAeL-oIFIEni-O5D8ooqR-tBQgEn-Qi8L&index=10&t=0s
and then also watch
https://www.youtube.com/watch?v=r8j0q6MF9iU&list=PLAeL-oIFIEni-O5D8ooqR-tBQgEn-Qi8L&index=11&t=1s
In general, I suggest you 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
Thanks, yes I have seen those already and they are far too complicated. Surely, there's some simple form or instruction that explains these new procedures and GUI bind to mob method.
And, these videos do not show the steps to set up the GUI, what procedure you need to attach to the input slot when something changes there, where and what procedure is attached to the output slot etc.
Just to note:
I'm presently working on videos myself to show people certain procedures and processes I've discovered. I think it's important to give to the community as much as it is to get from it, but I just find it so hard to achieve many of these techniques since there's so little out there. I would love to see a place where written and video tutorials are displayed and searchable and in categories rather than YouTube.
The tutorials are complicated because making a trading system with entities is a complicated process. Those are your best options if you need mob trades in your mod dude.
^^ This is very true.
Also if you think you lack basics of procedures, GUIs, ..., I suggest you 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
I worked it out after some trial and error. The mob trades coins for apples.
You make 2 procedures - 1 for trade called Trade, 1 for receiving the coin called Coin.
You add the GUI to the mob.
Inside it, you have slot 0, slot 1 and a trade button.
In slot 0: you limit it to apples only. No procedure needed for this slot.
The button: On Button Clicked - you put in the Trade procedure.
In slot 1: for When item taken from slot - you put in the Coin procedure.
Here are the 2 procedures:
Trade
if - Get item from slot 0 of the currently open GUI of Event/target entity = [apple item]
do - Set 1 [coin item] in slot 1 of the currently open GUI of Event/target entity
- Clear slot 0 of the currently open GUI of Event/target entity
Coin
Add 1 [coin item] to Event/target entity inventory
Clear slot 1 of the currently open GUI of Event/target entity
(I also added coin jingle sounds and when you right-clicked the mob he asks if you want to trade)