Fortune Procedure

Started by pomarf on

Topic category: User side tutorials

Joined Mar 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • 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
Joined Aug 2019
Points:

User statistics:

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

Good tutorial.

Joined Oct 2019
Points:

User statistics:

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

 

Joined Mar 2015
Points:

User statistics:

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

Joined Jan 2018
Points:

User statistics:

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

Joined Oct 2019
Points:

User statistics:

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

very good, thx

Joined Jun 2020
Points:

User statistics:

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

Joined Mar 2020
Points:

User statistics:

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

Vanilla is not editable without coding+hacking

Joined Jun 2020
Points:

User statistics:

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

Joined Jun 2019
Points:

User statistics:

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

Joined Jun 2020
Points:

User statistics:

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

Joined Jun 2019
Points:

User statistics:

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

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a better way to…
Mon, 06/22/2020 - 15:13

Is there a better way to accomplish this via a loot table? If so, how would that be done? I didn't know loot tables could be applied to just a basic ore block.

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you put a download link…
Tue, 06/30/2020 - 08:23

can you put a download link to this pleas i need it and i am to lazy