How would i make a procedure for a spawner that spawns Inquisitors and removes emeralds from their inventory ?

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:
How would i make a procedure for a spawner that spawns Inquisitors and removes emeralds from their inventory ?

In my mod, I have created Inquisitors who go out and look for monsters to kill. Whenever they get a kill, they have a 25% chance to spawn a new inquisitor, and an emerald is added to their inventory. If else a villager is spawned, and an emerald is added to their inventory. I also made a procedure where once a day, they will go to x  200, y 200, and z 200. I assume that doing this makes them appear like they are going on an adventure. At night, they look for villages which they will move into if they find one. I also have them follow other inquisitors or anyone carrying an inquisitor's sword. The inquisitor's sword sets monsters on fire and is made with black wool and rotten flesh. They also have armor, which would burn monsters if worn by them. They can drop emeralds, armor, their sword or crossbow, or inquisitor contracts. If the player has 9 inquisitor contracts, they can build a spawner. The spawner will spawn inquisitors as long as its inventory has 1 emerald. So far, I have set the spawner to spawn inquisitors and remove an emerald for each inquisitor spawned. Now I want the spawner to check for inquisitors in the chunk they are in and remove emeralds from their inventories.  I would also like the spawner to check the number of villagers in the village it is placed in once per day and if the number of inquisitors is less than 25% of the population of the village, a new inquisitor can spawn otherwise, the spawn is cancelled. Mainly because i dont want to have too many spawn.