Fortune Procedure

Started by pomarf on

Topic category: User side tutorials

Active 5 years ago
Joined Mar 2015
Points:
731

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
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
Active 1 day ago
Joined Aug 2016
Points:
3303

User statistics:

  • Modifications: 9
  • Forum topics: 63
  • Wiki pages: 20
  • MCreator plugins: 11
  • Comments: 2931
Very nice tutorial !
Wed, 09/11/2019 - 00:40

Very nice tutorial !

Active 4 years ago
Joined Aug 2019
Points:
740

User statistics:

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

Good tutorial.

Active 5 years ago
Joined Oct 2019
Points:
648

User statistics:

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

 

Active 5 years ago
Joined Mar 2015
Points:
731

User statistics:

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

Active 4 years ago
Joined Jan 2018
Points:
690

User statistics:

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

Active 4 years ago
Joined Oct 2019
Points:
643

User statistics:

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

very good, thx

Active 4 years ago
Joined Jun 2020
Points:
619

User statistics:

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

Active 2 years ago
Joined Mar 2020
Points:
888

User statistics:

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

Vanilla is not editable without coding+hacking

Active 4 years ago
Joined Jun 2020
Points:
619

User statistics:

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

Active 4 months ago
Joined Jun 2019
Points:
2787

User statistics:

  • Modifications: 4
  • Forum topics: 48
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3716
  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

Active 4 years ago
Joined Jun 2020
Points:
619

User statistics:

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

Active 4 months ago
Joined Jun 2019
Points:
2787

User statistics:

  • Modifications: 4
  • Forum topics: 48
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3716
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.

Active 4 years ago
Joined Jun 2020
Points:
619

User statistics:

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

Active 1 year ago
Joined May 2019
Points:
665

User statistics:

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