Started by
angel_mp4
on
Topic category: Help with Minecraft modding (Java Edition)
How can I generate more villages or any other type of structure, in a specific biome or dimension?
Example: A dimension with only 1 biome, which has many villages... Like 3 within a radius of 32 or 64 chunks
Edited by angel_mp4 on Sun, 09/24/2023 - 17:56
if the question is how do i have separate spawn rates of the same structure in a different dimension, then the answer would be to duplicate the structure, change the spawn rates and the dimension its in, and boom!
if the question is how do i increase the spawn rate above the limit, then lock the mod element, and try to find the stat that shows the spawn rate in one of the code editor sections.
you can access all things mentioned here by right clicking the mod element.
Sorry if I expressed myself wrong, I meant vanilla structures like villages, you know?
uhh. im unsure about that. maybe you can try finding a village structure download and make the namespace minecraft. that could work.
I'm going to try looking into this more as I'm now curious, but here's what I found so far . Hopefully it will give you a starting point.
http://jabelarminecraft.blogspot.com/p/minecraft-modding-custom-villages.html?m=1 - "Getting Villages To Generate In Different Biomes
The MapGenVillage class has a public static list of viable biomes called VILLAGE_SPAWN_BIOMES. You can edit it directly in the init loading phase of your mod using any standard List methods such as add(), remove(), clear() etc."
BTW public static means you should be able to call on/modify it from an external class.
Here are some more details about the class itself - https://nekoyue.github.io/ForgeJavaDocs-NG/javadoc/1.12.2/net/minecraft/world/gen/structure/MapGenVillage.html
Here is the class info for the biomes manager, which is what you would need to use - https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.9.4-12.17.0.205…
Without testing it myself, I think this is what you are looking for - https://github.com/MinecraftForkage/MinecraftForkage/blob/master/core/new-src/net/minecraftforge/common/BiomeManager.java
Essentially you need to call on static void addVillageBiome and add your biome to the array. It's all easier said than done, lol. I'm not super experienced in coding and this one is new to me, so without extensive testing, I can't say specifically what will work.
So, after trial and more research, it looks like the addVillageBiome is no longer a part of the Biome Manager. I'm not finding any current way of adding the village :(
Anyway, thanks again XD Stitch, you're helping a lot <3 if you want I can send you an alpha of my mod for you to test or anything you want... Just (if you want) give me your Discord or other social network :)
load minecraft in your mod.
load up a world
press / key
type in
/place xxxx minecraft:yyyy ~ ~ ~
make sure it doesn't have // as when you press / it gives you one already and most like to copy/paste
change xxxx to jigsaw, feature, structure, or template, in your case, structure.
change yyyy to structure which it has a dropdown list of. lets say igloo for now
copy it like this below
/place structure minecraft:igloo ~ ~ ~
then make a block <----(Step A) or while in game save an empty structure block with a 1x1x1 nbt with name you want. <----(Step B)
Step A
Make a block and finish it, make it just a blank canvas with invisible texture, save a transparent as a .png of 16x16
in blocks generation, guide where you want it placed, then go to triggers and hit + on update tick and do the following
or
Step B
Go to resources and click button in red circle
you'll see your structure saved.
Then make a structure element and set it up.
then in the structures element, click the red circle button
This will have a 70 percent chance of placing structure and removing the structure block if it's their. remove 70% chance if you want it to be placed 100 percent of the time when you're structure is placed.
pay attention to what triggers can and can't have.
enjoy adding more vanilla villages if you want to your mod.
In step A we are using ticks from the block, you'll need to go to advance properties and add in 10 or 20 ticks. It's also why we use a wait block or you end up with ghost blocks.