Help with drop from all monster entitys

Started by Rislir on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with drop from all monster entitys

Hi.

I want to make a mod that will drop a certain amount of currency from any monster (I'm using diamonds as an example). I can't find a way to specify the number of diamonds. For example, in the first case, I want to drop 2 diamonds. How can I do this?

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could create a local…
Tue, 07/22/2025 - 17:30

You could create a local itemstack variable, set it to a diamond, then set the count of the itemstack variable to 2, then drop the variable (this method also allows you to drop items with enchantments or some durability damage).

Alternatively, you could just duplicate the spawn dropped item block and have two of them for two diamonds (this is probably a slightly quicker and easier option, but less effective, and the first one doesn't really take that much time anyways).

Technically, you could also use a 'repeat' procedure block, but for dropping two of an item, you really don't need it, and for dropping lots of items, the first method is better anyways.

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm trying 1 option. I found…
Tue, 07/22/2025 - 19:31

I'm trying 1 option.

I found how to set itemstack... But i cant find, how to set count of the itemstack variable(( 

Can you show me an example like that? Thanks!

 

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(No subject)
Tue, 07/22/2025 - 19:34

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a procedure block…
Tue, 07/22/2025 - 21:39

There is a procedure block under "Item procedures" -> "Actions" called "Set number of items in [Provided itemstack] to [64]" you can swap out [provided itemstack] for the variable, and [64] for 2.

(it is the third procedure block from the top in Item procedures -> Actions)