(NOT SOLVED) How can I generate more vanilla structures, in a specific biome or dimension?

Started by angel_mp4 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(NOT SOLVED) How can I generate more vanilla structures, in a specific biome or dimension?
Sun, 09/24/2023 - 17:56 (edited)

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
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if the question is how do i…
Sat, 09/23/2023 - 21:58

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.

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry if I expressed myself…
Sat, 09/23/2023 - 22:37

Sorry if I expressed myself wrong, I meant vanilla structures like villages, you know?

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
uhh. im unsure about that…
Sat, 09/23/2023 - 22:42

uhh. im unsure about that. maybe you can try finding a village structure download and make the namespace minecraft. that could work.

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm going to try looking…
Mon, 09/25/2023 - 03:21

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."

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
BTW public static means you…
Mon, 09/25/2023 - 03:22

BTW public static means you should be able to call on/modify it from an external class.

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here are some more details…
Mon, 09/25/2023 - 03:52

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…

 
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Without testing it myself, I…
Mon, 09/25/2023 - 03:53

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

 

@SuppressWarnings("unchecked")
    public static void addVillageBiome(BiomeGenBase biome, boolean canSpawn)
    {
        if (!MapGenVillage.villageSpawnBiomes.contains(biome))
        {
            ArrayList<BiomeGenBase> biomes = new ArrayList<BiomeGenBase>(MapGenVillage.villageSpawnBiomes);
            biomes.add(biome);
            MapGenVillage.villageSpawnBiomes = biomes;
        }
    }

 

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.

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So, after trial and more…
Mon, 09/25/2023 - 04:38

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 :(

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Anyway, thanks again XD…
Mon, 09/25/2023 - 10:53

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 :)

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
load minecraft in your mod…
Wed, 09/27/2023 - 03:17

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

Image

or

Step B
Go to resources and click button in red circle
Image

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

Image

 

Image

 

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. 
Image

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.