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

Started by CaiGuyCrafter on Sun, 09/25/2022 - 02:34

Topic category: Help with modding (Java Edition)

Last seen on 02:48, 26. Nov 2022
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a block only generate if you have less than a certain number of that item.
Sun, 09/25/2022 - 02:34

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!