VillagersB - Minecraft Mod banner

VillagersB - Minecraft Mod

6 devlogs
10h 28m 29s

A Quality of Life mod for villagers. 26.1.1, fabric loader 0.18.6, fabric api 0.145.3+26.1.1

  • Removes the breed timer for villagers so you can quickly start a villager breeder.
  • Allows you to "carry" villagers by pressing "V"(configurable key)…

A Quality of Life mod for villagers. 26.1.1, fabric loader 0.18.6, fabric api 0.145.3+26.1.1

  • Removes the breed timer for villagers so you can quickly start a villager breeder.
  • Allows you to “carry” villagers by pressing “V”(configurable key)
  • Convert nitwits(green villagers that don’t pick up a job) to normal villagers by giving them an emerald.

This mod was originally named villagers++ but for some reason I couldn’t get it to compile, so I thought maybe the name was the issue and for some reason redownloading the template with a different name fixed it. The B in the project name stands for “Better”

I also want to allow you to reroll villagers buy options so that getting mending is easier

This project uses AI

I asked it about shadowing in Java and asked it to help me with a compilation error for a mixin
I asked chatgpt for a command on how to turn villagers spawned with spawn eggs into nitwits, so that I could properly test whether the code was working or not.

Demo Repository

Loading README...

Noten

Finished the project by adding particle effects.

Currently, the project has 3 features:

  • Remove the timer for breeding for villagers, this will allow you to quickly start a villager breeder with only 2 villagers.
  • You can carry villagers by pressing the “V” key. That way you don’t have to deal with boats and you don’t have to worry about villagers being attacked while you’re moving them. This will make starting a villager breeder faster too.
  • You can convert “nitwit” villagers(villagers that don’t do any job) to normal villagers by giving them 1 emerald.

There are particle effects for carrying and converting villagers too.

I might add more features later but for now I think this is pretty good, considering that my experience with modding and Java in general is near zero :D

0
Noten

Due to the way the villagers ai works, even though I correctly store the villagers profession in data attachments, when the code spawns the villager back into the world, it briefly keeps its job but then immediately becomes unemployed again.

I couldn’t fix it unfortunately.

On the bright side, I added emeralds to the list of items Villagers can pick up, and now if you give an emerald to a lazy villager it will become a normal villager. You can bribe villagers to not be lazy now.

I originally tried to use mixins to add Emeralds to the list of things villagers can pick up but someone on the fabric discord told me thats not how you’re supposed to do that, and now I am using datageneration.

Next, I also want to add particle effects for when you pick up villagers, and also bribe them to not be nitwit(lazy). I will also try to add a client side renderer for when you’re carrying villagers.

0
Noten
  • You can transport villagers now

I still need to store their job in data attachments though

0
Noten

I am bamboozled.

Appearently I can either save the NBT/ValueOutput/TagValueOutput thingy or save it as a data attachment

I am looking at the code for the CarryOn mod so that I have a clue as to what I need to do but even that isn’t helping

Wish I had picked something easier to do.

On the bright side, now when I press V it correctly determines the closest villager and “deletes” it from the world. I need to store the data of the villager in the player though.

I need to add a data attachment to the player, store villagers profession & age, write a clientside render thing to display a villager above the players head, and then when the player presses V again it spawns the villager back. I think that’s what I need to do.

Anyways thats a future me problem :D

0
Noten

Added a keybinding, now gotta figure out how can I make the player be able to pick up mobs

Attachment
0
Noten
  • Allow villagers to breed without waiting a long time, this will make starting a villager breeder with only 2 villagers a lot faster. I did this by writing a mixin for the Villager class.

There is a bug where baby villagers can breed but I fixed it in the latest version.

0