How to limit the amount of items that spawn in Minecraft Bedwars? [closed]
In order to do this you basically need to be able to count every item in an area or in the entire minecraft map, which can be accomplished in multiple steps:
- Create a scoreboard objective which will hold your item count for different kinds of items, I recommend displaying it on the sidebar to see it easier.
/scoreboard objectives add itemCount dummy
- Create a function that can be run which stores an item's "Count" data into a variable and adds that variable to a fake player's itemCount score
# Function commands
execute store result score Item itemCount run data get entity @s Item.Count
scoreboard players operation Total itemCount += Item itemCount
- Then, every time you want to count a particular set of items, reset the Total itemCount score and execute the function on all items you want to count
/scoreboard players set Total itemCount 0
/execute as @e[type=item,name=Andesite] run function namespace:function
Then, after you've run these commands, you can choose to only run your item-summoning generator when "Total"s "itemCount" score is below a certain number. I also recommend changing the commands to more closely fit what you want to count.