Jump to content

[1.15.2] How to specify drops from blocks and other noob questions


inuasha880

Recommended Posts

I last used forge to create mods back in 2015 and a lot has changed since then. The new registry system alone is very different, but so are a lot of the methods on the Block and Item parent classes.

 

I'm trying to find how I can specify the drops of a block when it is broken. I'd like to create a pair of blocks similar to stone and cobblestone. I have see the onBlockHarvested method, but I simply don't know how to spawn in an entity for a block or item from here or if this is even the correct method to override.

Am I on the correct path here or is there a much simpler way that I am missing here?

 

On a related note of being so lost in this new era of Forge, where can I find the most complete documentation on forge libraries? I have been reading the documentation on mincraftforge.net but there is obviously a lot that it does not cover such as biomes, dimensions, ore generation, etc. Where can I go to learn more about these topics and is the the most active form to read and learn from?

 

Link to comment
Share on other sites

Block drops are done using loot tables, vanilla sources are a good reference, and the Minecraft wiki has a breakdown of the loot table json.

 

Unfortunately the forge docs are out of date, I use Google and the forums search to get info on stuff I tinker with. Lots of vanilla sources and forums reading!

  • Like 2
Link to comment
Share on other sites

33 minutes ago, inuasha880 said:

Also, is there still a way to just run minecraft from the IDE to debug it quickly like before, or did the new launcher ruin that?

You can still run Minecraft from your IDE be pressing the run button.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

Link to comment
Share on other sites

19 hours ago, inuasha880 said:

Ugdhar, thanks for the reply. Where can I find good references in the vanilla system for loot tables? Also, is there still a way to just run minecraft from the IDE to debug it quickly like before, or did the new launcher ruin that?

If you open your external dependencies, then go to client-extra.jar/data/minecraft/loot_tables you will find the vanilla examples.

You can also look here https://minecraft.gamepedia.com/Loot_table for more information and intricacies (as Ugdhar already mentioned)

 

The documentation is outdated in minecraftforge.net but the github one is much better (https://github.com/MinecraftForge/Documentation/tree/1.15.x)

 

I hope this was helpful !

 

 

Link to comment
Share on other sites

On 4/22/2020 at 12:59 AM, inuasha880 said:

Also, is there still a way to just run minecraft from the IDE to debug it quickly like before, or did the new launcher ruin that?

I use Eclipse, and the debug function and breakpoints work just fine! :)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.