Minecraftforge: Modded Zombie villagers won't spawn naturally

Created on 21 Oct 2018  路  8Comments  路  Source: MinecraftForge/MinecraftForge


https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch

The onInitialSpawn method should be patched so the random profession is polled from the registry instead of a random integer from 0 to 5.

1.12 Bug

Most helpful comment

I would prefer the tag system, as other professions wouldn't be disabled, just not auto-assigned.
The other advantage that the tag system could have is per-biome professions (e.g. you wouldn't get desert traders in a cold biome).

To clarify I'm not suggesting that we add per biome tags, but it would make it possible/easy if someone else wanted to

All 8 comments

It should maybe be a list or flag, so certain professions can be excluded (some mods might want to place their villagers more precisely).

I might be misunderstanding the issue here, is very hard to determine if the flag currently exists looking on my phone.

@alpvax unfortunately, we cannot set registry objects as inactive while lex does not recommend register to registry optionally based on config, etc.

@Alpvax made a great point, but it was so large that we should cover it in another issue. Given Lexmanos' official stance that all possible registry entries should be registered even if they are disabled in config (but they still should not be returned when polling random entries), this need stands out more. We can add a mechanism of "inactive registry entry" in which the entry won't be chosen during a poll of random registry entries.

I wasn't suggesting that we remove things from the registry, I was suggesting a way to exclude them from the random selection.

I am not suggesting removals; I say lex suggest modders always register all entries, some of which needs to be excluded

If the VillagerRegistry were to implement the 1.13 tag system, then it'd be as simple as building a spawnlist from a list of villagers tagged with some form of "zombifiable" tag, which is essentially the flag that @Alpvax mentioned

Correct me if I'm wrong but this could be an avenue for pack makers to append the tag themselves in the case of something like skyblock where structures aren't generated and refined placement of villagers isn't possible

Or we can use a general "enabled" tag for all registry entries.

I would prefer the tag system, as other professions wouldn't be disabled, just not auto-assigned.
The other advantage that the tag system could have is per-biome professions (e.g. you wouldn't get desert traders in a cold biome).

To clarify I'm not suggesting that we add per biome tags, but it would make it possible/easy if someone else wanted to

Was this page helpful?
0 / 5 - 0 ratings