Procedure: How to increase the drop rate of an item if you have a specific item in your inventory

Started by Luigi999999 on

Topic category: Help with modding (Java Edition)

Last seen on 08:14, 30. Dec 2018
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedure: How to increase the drop rate of an item if you have a specific item in your inventory

I would like to create a procedure : if I kill a (custom) mob, it has the chance to drop an item with a low chance but if you have a specific item in your inventory, the mob drops it with a higher chance. I already tried using a If/Else procedure but it didn't work (maybe I did something wrong). Thank you in advance 

Last seen on 08:14, 30. Dec 2018
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have used “Random0,1 < 0.5…
Sat, 12/22/2018 - 07:53

I have used “Random0,1 < 0.5” and I tried to put them one  below the other.. Did I miss something?

It should work like this,…
Sat, 12/22/2018 - 12:46

It should work like this, yes. Maybe post a picture of your procedure and trigger settings.

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe make a procedure if …
Sun, 12/23/2018 - 15:19

Maybe make a procedure if (item) is = to entities main hand

if random 0,1 < 0.5 (drop item) at x y z

put this with the when mob killed procedure

Last seen on 08:14, 30. Dec 2018
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Link to the Console error:…
Mon, 12/24/2018 - 12:57

Link to the Console error: https://pastebin.com/VBkw9bTy

Link to the procedure code: https://pastebin.com/fY9gz3tV

Link to the entity that drops the items (A mob called "Hit"): https://pastebin.com/2W9hLsnM

This is my procedure: https://imgur.com/gallery/jOtQvT9

 

Thank you in advance :)

 

 

The issue is here: https:/…
Tue, 12/25/2018 - 14:39

The issue is here: https://imgur.com/OKJwsen

You are checking if the entity has something in the inventory, but this is checking the mob you kill, not your inventory. Avoid using this as this block is causing the crash.

Last seen on 08:14, 30. Dec 2018
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you. But how can I…
Wed, 12/26/2018 - 10:59

Thank you. But how can I check if the player has that item in the inventory , then increases the drop rate? Is it possible?