Spawning a random item from minecraft database pool

Started by Marwinekk256 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Spawning a random item from minecraft database pool

Hello,

I've been trying to make my custom block drop a random item of all the items in minecraft (not specific items, but ALL items) when destroyed but I can't think of anything that would work :(

I know that I can do that with a loot table in which I could just put every item into pool by hand - but that's the problem - how to do that in quicker and more clever way, than just putting every each of item into the loot pool

I'll be grateful for any help <3

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I would still appreciate…
Sun, 05/01/2022 - 17:18

I would still appreciate help with this thingy ;0

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Somewhat of what you want…
Sun, 05/01/2022 - 18:18

Somewhat of what you want will be added in the next version of mcreator, but you need to somehow add the entire minecraft database pool to a tag.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yea I know I can use a loot…
Thu, 05/05/2022 - 12:27

Yea I know I can use a loot table but thats the problem - how to do it without a loot table? I don't mind a bit of coding, so I'd appreciate if y'all showed me how to access (even with custom coding) the item database so I don't have to define every single item in loot pools

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also I don't want a loot…
Thu, 05/05/2022 - 12:35

Also I don't want a loot table method, cuz I want the block to spawn not only a random item from vanilla minecraft, but also items from other mods. That's why I need to know how to tell the code that it should spawn ANY item