entity trade like piglins

Started by softmushroombaby on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 month ago
Joined Feb 2025
Points:
114

User statistics:

  • Modifications: 1
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 36
entity trade like piglins

https://imgur.com/a/fvw7BBV

I want to make it so when I right-click a mob, they look at an item, and 5 seconds later, throw back a random item! (kind of like piglin trades!) But the "wait 100 ticks" procedure doesn't allow any randomizers because of a local variable. how do I work around this?

Active 14 hours ago
Joined Dec 2014
Points:
1085

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 674
You could (and should) just…
Thu, 04/10/2025 - 11:05

You could (and should) just use a loot table

Active 14 hours ago
Joined Dec 2014
Points:
1085

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 674
and you should use  instead…
Thu, 04/10/2025 - 11:06

and you should use 

instead of remove item from inventory

Active 1 month ago
Joined Feb 2025
Points:
114

User statistics:

  • Modifications: 1
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 36
Thank youu!! The loot table…
Wed, 04/23/2025 - 03:01

Thank youu!! The loot table works perfectly! the shrinking doesn't seem to do anything though?

Active 1 month ago
Joined Feb 2025
Points:
114

User statistics:

  • Modifications: 1
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 36
Actually it works! Thank you…
Wed, 04/23/2025 - 03:20

Actually it works! Thank you! Though while I'm at it, how do I set something as an Provided Itemstack? I still have no clue how that code works

 

Active 14 hours ago
Joined Dec 2014
Points:
1085

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 674
um I'm pretty sure you can't…
Wed, 04/23/2025 - 10:13

um I'm pretty sure you can't change the provided itemstack

Active 14 hours ago
Joined Dec 2014
Points:
1085

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 674
through just procedure…
Wed, 04/23/2025 - 10:13

through just procedure blocks anyway