entity trade like piglins

Started by softmushroombaby on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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?

Joined Dec 2014
Points:

User statistics:

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

You could (and should) just use a loot table

Joined Dec 2014
Points:

User statistics:

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

and you should use 

instead of remove item from inventory

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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?

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Joined Dec 2014
Points:

User statistics:

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

through just procedure blocks anyway