Fortune Procedure

Started by pomarf on Thu, 08/29/2019 - 10:28

Topic category: User side tutorials

Last seen on 03:04, 9. Feb 2020
Joined Mar 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Fortune Procedure
Thu, 08/29/2019 - 10:28 (edited)

So I've seen a few posts asking how to do fortune on custom ores, and I, myself was even asking a few days ago, but I figured it out and I figured I would make a sort of "mini-tutorial" on how to do it. So here we go.

First, after you've got your custom ore block, and the item that it drops, made go into your block file and go to the procedures tab.
Once there click on the new procedure button under the "When block destroyed by player" option.Block Procedures Tab

 

After you've got your new procedure open, you may want to add the option for the ore to drop xp, as I have done here, but after that you just want to basically recreate this:

Simple Fortune Procedure
I only used diamond as an example, you would want to use whatever item your ore is supposed to drop.

You can change the drop percentages by adjusting the number on the right side, found here:
Drop rate

This for example would be a 38% drop chance. You could change it to 0.1 for 10% or 0.25 for 25%, etc.

It turns out it wasn't too difficult to make fortune work, just a little tedious.
Hopefully this helps some of you! :)

Edited by pomarf on Thu, 08/29/2019 - 10:28
Last seen on 09:17, 20. Feb 2020
Joined Aug 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Good tutorial.
Wed, 09/25/2019 - 08:06

Good tutorial.

Last seen on 06:03, 29. Oct 2019
Joined Oct 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
If we procede this way,…
Thu, 10/24/2019 - 19:37

If we procede this way, every block that you mine with the pickaxe you have set this setting on will fortune every type of block wich will give you diamonds if you mine any type of block.

 

Last seen on 03:04, 9. Feb 2020
Joined Mar 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
This procedure goes on the…
Mon, 12/30/2019 - 04:47

This procedure goes on the block, not the tool.
So you would use whatever your block is supposed to drop, I just used diamond in this for an example.

Last seen on 15:34, 29. Jun 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Very good tutorial. As a…
Sun, 03/08/2020 - 21:10

Very good tutorial. As a suggestion, make to sure to check if the player is on adventure or survival mode, or the XP and gems will also appear if the player is in creative mode.

Last seen on 22:41, 3. Jun 2020
Joined Oct 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
very good, thx
Sun, 05/10/2020 - 18:10

very good, thx

Last seen on 02:32, 1. Jul 2020
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
I know this is old, but just…
Sun, 06/21/2020 - 06:18

I know this is old, but just curious.. Is there a way to apply procedures like this to a vanilla block? For example, if I wanted to make vanilla iron ore drop a chunk of iron instead of the block and have fortune capabilities for it.

Last seen on 10:33, 1. Jul 2020
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Vanilla is not editable…
Sun, 06/21/2020 - 07:59

Vanilla is not editable without coding+hacking

Last seen on 02:32, 1. Jul 2020
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
So through coding, I know…
Sun, 06/21/2020 - 21:51

So through coding, I know you can create an event handler and check when a block is destroyed and if it's a certain block, you can clear the drops and add your own. MCreator doesn't have this capability to handle events like that?

Last seen on 09:17, 2. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
  thesupermodder: You CAN…
Mon, 06/22/2020 - 01:09

 

thesupermodder: You CAN apply this to vanilla blocks. There is a on block broken global trigger for all blocks

which works as a standard forge event :D

Last seen on 02:32, 1. Jul 2020
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Thanks for confirming that…
Mon, 06/22/2020 - 05:37

Thanks for confirming that it can be done. I was looking at that trigger and playing around with it. Out of curiosity, is there any downside to spawning in an item when a block is broken rather than changing the actual drop of the block (aside from the weirdness of the item going flying when it spawns in)?

Last seen on 09:17, 2. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
it would override drops from…
Mon, 06/22/2020 - 06:38

it would override drops from other mods, and it won't be compatible with datapack loot tables.