Jump to content

Make custom dimension that is based on the nether a surface world


ThanosGecko

Recommended Posts

You would need to override createChunkGenerator and return your own chunk generator that generates terrain in the way that you want.

It's not a simple process, but if you study how vanilla does it then you should get an idea of what to do.

I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.

Link to comment
Share on other sites

43 minutes ago, imacatlolol said:

You would need to override createChunkGenerator and return your own chunk generator that generates terrain in the way that you want.

It's not a simple process, but if you study how vanilla does it then you should get an idea of what to do.

I've already made my own chunk generator and all that, but the vanilla code is super confusing and like 90% of the variables are obfuscated even with updated mappings. Also it's a crap ton of math functions that I don't think I could realistically comprehend.

Link to comment
Share on other sites

16 minutes ago, ThanosGecko said:

I've already made my own chunk generator and all that, but the vanilla code is super confusing and like 90% of the variables are obfuscated even with updated mappings. Also it's a crap ton of math functions that I don't think I could realistically comprehend.

Well, here's a couple ideas to try:

  • To get rid of the roof bedrock you can override getBedrockRoofHeight to 0 in NetherGenSettings.
  • After that, try making your own CaveWorldCarver that works the same as NetherCaveWorldCarver, but with a higher maximum height so that it breaks through the top.

No idea if it'll work like you want, but it's worth trying. Experimentation is generally a good way to go.

I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.

Link to comment
Share on other sites

12 hours ago, imacatlolol said:

Well, here's a couple ideas to try:

  • To get rid of the roof bedrock you can override getBedrockRoofHeight to 0 in NetherGenSettings.
  • After that, try making your own CaveWorldCarver that works the same as NetherCaveWorldCarver, but with a higher maximum height so that it breaks through the top.

No idea if it'll work like you want, but it's worth trying. Experimentation is generally a good way to go.

I've already done the bedrock thing, that works fine. The CaveWorldCarver is a biome specific thing, and I know it's not the thing that controls if there's a roof or not as I replaced my biome with an OceanBiome and it still had a roof. I'm fairly sure it's in either the chunk generator or the noise chunk generator, but both have like 4 methods that are incomprehensible.

Link to comment
Share on other sites

It seems like it might be something in either this method:
 

public int func_222529_a(int p_222529_1_, int p_222529_2_, Heightmap.Type heightmapType) {
		int i = Math.floorDiv(p_222529_1_, this.horizontalNoiseGranularity);
		int j = Math.floorDiv(p_222529_2_, this.horizontalNoiseGranularity);
		int k = Math.floorMod(p_222529_1_, this.horizontalNoiseGranularity);
		int l = Math.floorMod(p_222529_2_, this.horizontalNoiseGranularity);
		double d0 = (double)k / (double)this.horizontalNoiseGranularity;
		double d1 = (double)l / (double)this.horizontalNoiseGranularity;
		double[][] adouble = new double[][]{this.func_222547_b(i, j), this.func_222547_b(i, j + 1), this.func_222547_b(i + 1, j), this.func_222547_b(i + 1, j + 1)};
		int i1 = this.getSeaLevel();

		for(int j1 = this.noiseSizeY - 1; j1 >= 0; --j1) {
			double d2 = adouble[0][j1];
			double d3 = adouble[1][j1];
			double d4 = adouble[2][j1];
			double d5 = adouble[3][j1];
			double d6 = adouble[0][j1 + 1];
			double d7 = adouble[1][j1 + 1];
			double d8 = adouble[2][j1 + 1];
			double d9 = adouble[3][j1 + 1];

			for(int k1 = this.verticalNoiseGranularity - 1; k1 >= 0; --k1) {
				double d10 = (double)k1 / (double)this.verticalNoiseGranularity;
				double d11 = MathHelper.lerp3(d10, d0, d1, d2, d6, d4, d8, d3, d7, d5, d9);
				int l1 = j1 * this.verticalNoiseGranularity + k1;
				if (d11 > 0.0D || l1 < i1) {
					BlockState blockstate;
					if (d11 > 0.0D) {
						blockstate = this.defaultBlock;
					} else {
						blockstate = this.defaultFluid;
					}

					if (heightmapType.getHeightLimitPredicate().test(blockstate)) {
						return l1 + 1;
					}
				}
			}
		}

		return 0;
	}

 

 

or this method:

 

public void generateSurface(IChunk chunkIn) {
		ChunkPos chunkpos = chunkIn.getPos();
		int i = chunkpos.x;
		int j = chunkpos.z;
		SharedSeedRandom sharedseedrandom = new SharedSeedRandom();
		sharedseedrandom.setBaseChunkSeed(i, j);
		ChunkPos chunkpos1 = chunkIn.getPos();
		int k = chunkpos1.getXStart();
		int l = chunkpos1.getZStart();
		double d0 = 0.0625D;
		Biome[] abiome = chunkIn.getBiomes();

		for(int i1 = 0; i1 < 16; ++i1) {
			for(int j1 = 0; j1 < 16; ++j1) {
				int k1 = k + i1;
				int l1 = l + j1;
				int i2 = chunkIn.getTopBlockY(Heightmap.Type.WORLD_SURFACE_WG, i1, j1) + 1;
				double d1 = this.surfaceDepthNoise.noiseAt((double)k1 * 0.0625D, (double)l1 * 0.0625D, 0.0625D, (double)i1 * 0.0625D);
				abiome[j1 * 16 + i1].buildSurface(sharedseedrandom, chunkIn, k1, l1, i2, d1, this.getSettings().getDefaultBlock(), this.getSettings().getDefaultFluid(), this.getSeaLevel(), this.world.getSeed());
			}
		}

		this.makeBedrock(chunkIn, sharedseedrandom);
	}

 

 

But I'm not sure what to change

Link to comment
Share on other sites

Alright I ended up commenting out random lines of code and one of them worked lmao. For anybody else that might need this in the future, I just commented out this line in the ChunkGenerator:

private double[] func_222572_j() {
		double[] adouble = new double[this.noiseSizeY()];

		for(int i = 0; i < this.noiseSizeY(); ++i) {
			adouble[i] = Math.cos((double)i * Math.PI * 6.0D / (double)this.noiseSizeY()) * 2.0D;
			double d0 = (double)i;
			if (i > this.noiseSizeY() / 2) {
				d0 = (double)(this.noiseSizeY() - 1 - i);
			}

			if (d0 < 4.0D) {
				d0 = 4.0D - d0;
				//adouble[i] -= d0 * d0 * d0 * 10.0D;
			}
		}

		return adouble;
	}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • SANGOMA IN MANKWENG ╬✯{+2760{680}{4550}✯╬TRADITIONAL HEALER IN POLOKWANE.Turfloop, Loius Trichardt Mokopane, Seshego, Lebowakgomo, Tzaneen, Mankweng, Mokopane, Lephalale, Burgersfort, Jane furse, Bochum, Phalaborwa Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • I tried playing my Minecraft world, it kept on making me leave the world and also kept on saying "Connection lost, invalid player data" and there was a button that said "Back to server list". And when I clicked it, it led me to the MULTIPLAYER MENU! Remember, this was a singleplayer world, NOT multiplayer. Its ever that I need to update forge (Which maybe is the reason why there is a flashing symbol right next to the Forge section in the mods menu), or its one of those stupid bugs. if its a bug, tell me that it is AND tell me how to fix it. If I cant, then just fix the bug for the new Forge update. ADIOS! -LiveZezo
    • Hi guys, I have a Minecraft mod pack 1.19.2 Could anyone help me to find the mod that causes this bug? When I place the item to craft something in the crafting table, the item that I want to craft doesn't show up on the right of the crafting table, but if I click in the square I can get it. Please help me   Here there is the mods list: https://pastebin.com/GwP38utW   Here are the logs: https://mega.nz/file/g39QhQbB#dIM_xytlAcIJVYh9rp81QrM3V2USvACG9hPamJ00Bq4
    • Recently updated the mod pack on my hosted server and from what I've see on the server logs this is a client side issue. When I try to join not just my server but a testing server (Purple Prison if it helps), I get the error IndexOutOfBoundsException on both ones. Mine is modded while the testing server is a vanilla server. The modpack works just fine when doing a single player world so I think it might just be a connection issue? To be fair, I don't have the best internet so not sure if this is just a connection issue from my internet that likes to be spotty with connection sometimes. I have reset my router already if that makes a difference. Any help please?
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.