Checking for amount of item

Started by DavidZar on

Topic category: Help with MCreator software

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Checking for amount of item

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
Points:

User statistics:

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

User statistics:

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

User statistics:

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

I have this problem too

Last seen on 02:22, 16. Jul 2023
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not sure if this is what you…
Sun, 12/13/2020 - 01:50

Not sure if this is what you're looking as I did it in block code and it sounds like your doing proper code but this is a video on how to do it with block code which I hope should give you a general idea on how it should work with code :)

https://www.youtube.com/watch?v=gfINcKSsfCs&feature=youtu.be

Last seen on 03:55, 21. May 2022
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, I tried to use your…
Sat, 04/17/2021 - 17:27

Hello, I tried to use your video, but it wouldn't let me put Source Entity (or Event/target entity, like you did) in the "Get a copy of item from slot "loopnumber" of ____ if it has inventory".