How to make a block drop an unknown item?

Started by SentientCactus007 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a block drop an unknown item?

So I'm creating an add-on mod for a mod, as I felt like there were a few things missing and I wanted to add them myself in this mod (I've gotten permission to make the mod), but the problem I'm facing is that since I can't use the main mod in mcreator I can't reference any of the items or blocks in said mod in my mod, so that they get dropped and upon trying to edit the Java code to set the drop or item from filler item to item X I get a compile error. If any of you all know an awnser or have a guide upon how to do this that'd be greatly appreciated. :)

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Edit the loot table of theā€¦
Tue, 09/01/2020 - 16:39

Edit the loot table of the block (the code itself), and change what it drops. I don't really know how to explain this, so here's my attempt at an example.

Let's say I make a Brine 2 mod, and want it to drop something from Brine (my main mod). In the loot table, instead of brine_2:groovy_item, I would do brine:groovy_item.

Keep in mind, I have absolutely no idea if this will actually work or not, and you'll have to have both mods installed at once. In fact, it will probably cause an error, but try it just in case.