Checking for amount of item

Started by DavidZar on Wed, 03/18/2020 - 04:23

Topic category: Help with MCreator software

Last seen on 22:11, 1. Apr 2020
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Checking for amount of item
Wed, 03/18/2020 - 04:23

I'm making a mod situated around radioactive materials.

I can't figure out how to check for a specific amount of a specific item in the players inventory.

For example:
64 diamonds
6 stacks and 24 iron ore

All I really want is a simple bit of code that will test how many beacons the player has every tick and output the amount in chat, and just the amount.

Pretty much just this:

every tick
check how many beacons the player has
sent however many beacons the player has

If I get that I can go from there, thanks!

Last seen on 22:11, 1. Apr 2020
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
When I said "a simple bit of…
Wed, 03/18/2020 - 04:25

When I said "a simple bit of code" I either mean the block code MCreator uses, or something in "Advanced/Custom code snippet:"

If there's another way of doing this I don't know of I'll do that as well, at this point I will literally do anything to check for a specific amount of items in the players inventory!

Last seen on 17:37, 3. Jun 2020
Joined Feb 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hi DavidZar! Have you find a…
Sat, 05/23/2020 - 00:18

Hi DavidZar!

Have you find a way to fix your problem? I've been trying to make a mod and I ran into the same barrier you have.

How did you manage to solve it?

Thanks!

Last seen on 15:28, 25. Sep 2020
Joined Sep 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I have this problem too
Wed, 09/23/2020 - 02:13

I have this problem too