Is there any way of making the game check to see if there are a certain number of a specific npc?

Started by Chemistry101 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there any way of making the game check to see if there are a certain number of a specific npc?

I was working on a project where I added zombie crossbowmen and skeleton crossbowmen who when they kill a target spawn in another of the same type. I have noticed that the game's FPS goes down quickly as these npcs overwhelm the game. I am curious if there are ways to make it so that if there are >20 of a certain NPC, they would spawn a specific block. If the block is not destroyed, it will also check to see if there are >20; if not, it will spawn the NPC and the block will disappear.