Make Player drop item from inventory

Started by Twebster9000 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make Player drop item from inventory

I have a mob that when it hits you there's supposed to be a chance that the item you have in your hand drops out of your inventory.

This could be achieved by checking for literally every item then dropping the one you're holding, but that would be way too much work. Is there an easy way to do this I've overlooked?

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can use a loop that…
Fri, 12/06/2024 - 03:57

you can use a loop that increase the value of a variable and then checks a slot number, you then replace that number area with he variable so every time it loops it changes the slot to check.