Help with villagers

Started by Joghdae on

Topic category: Help with modding (Java Edition)

Last seen on 14:41, 31. Aug 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with villagers
Wed, 08/16/2023 - 18:01 (edited)

Hello everyone, I'm makeing a mod about plagues and I want to make so if a villager is infected with the plague it stays near his bed until you cure him.

I also want to make them unable to trade with you unless they don't have the plague anymore. That's all.

Edited by Joghdae on Wed, 08/16/2023 - 18:01
Last seen on 15:17, 9. Nov 2023
Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I had done a similar thing…
Sat, 08/19/2023 - 03:54

I had done a similar thing involving a plague in incmod. What I had to do to figure this out was make a custom entity that was a plagued villager/entity. I made a whole model and went the long route for that but if you're wanting to keep it simple you can just texture the villager model mcreator offers. Then, When an entity contracts this plague, the entity despawns and is replaced with the plagued entity. You can reverse this when cured. Do not assign the plagued entity as a villager when creating it and it will then not be able to trade with you. You can then set the ai to seek indoors if possible. This will cause your entity to stay inside of a home anytime it can. You can then have your entity seek out something specific in the world, similar to the Alay in the basegame. You can set this to beds, and when your plagued villager finds said bed, if you make sure it's ai is not allowed to break blocks. It'll sorta just hang around the bed.

The main thing I can't help you with is getting your villager to actually sleep in the bed. I couldn't figure that out either. I hope this helps any and best of luck!

Last seen on 14:41, 31. Aug 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for the suggestion, I…
Sat, 08/19/2023 - 16:18

Thanks for the suggestion, I'm going to try it. Thanks.

Last seen on 15:17, 9. Nov 2023
Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Let me know how it goes and…
Sat, 08/19/2023 - 17:36

Let me know how it goes and if you need any more help.