Need help despawning and spawning wandering villagers

Started by nightwing1 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need help despawning and spawning wandering villagers

Basically i need i am making a mod that checks if i am right clicking a bell, if so, then despawn all wandering traders in the area, and then wait a few moments and spawn a new wandering trader, the code works well until it needs to spawn traders, it just doesn't.

 

visual code -> https://ibb.co/2vZ0KG9