How to make a block only generate if you have less than a certain number of that item.

Started by CaiGuyCrafter on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a block only generate if you have less than a certain number of that item.

So, I'm making a mod involving a feature where there is a naturally generating block, but you can only have 7 of them at a time. One you've used them for the purpose of my mod, that variable will reset and you can go find these blocks all over again. I have created a number variable already, but I'm not sure how to work the Additional Generation Conditions. I tried doing "If: 'Get Global: [BlockCount] < 7' And 'Is the same block as: Air: 'Get Block at: X, Y, Z' Do: 'Return: True', and then on the outside of it, 'return false'". I've tried to set that for the generation conditions, but it says it's missing dependencies. If someone could help me with this part, that would be great!