Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Make custom dimension that is based on the nether a surface world
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
ThanosGecko

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

By ThanosGecko, April 3, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

ThanosGecko    0

ThanosGecko

ThanosGecko    0

  • Tree Puncher
  • ThanosGecko
  • Members
  • 0
  • 5 posts
Posted April 3, 2020

I basically copy pasted all the code necessary for a dimension based on the Nether, but I'm now trying to figure out how to make it have an open top/roof. I tried overriding isSurfaceWorld, but that doesn't seem to work. Any ideas?

  • Quote

Share this post


Link to post
Share on other sites

imacatlolol    60

imacatlolol

imacatlolol    60

  • Diamond Finder
  • imacatlolol
  • Forge Modder
  • 60
  • 274 posts
Posted April 3, 2020

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.

  • Quote

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

Share this post


Link to post
Share on other sites

ThanosGecko    0

ThanosGecko

ThanosGecko    0

  • Tree Puncher
  • ThanosGecko
  • Members
  • 0
  • 5 posts
Posted April 3, 2020
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.

  • Quote

Share this post


Link to post
Share on other sites

imacatlolol    60

imacatlolol

imacatlolol    60

  • Diamond Finder
  • imacatlolol
  • Forge Modder
  • 60
  • 274 posts
Posted April 3, 2020
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.

  • Quote

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

Share this post


Link to post
Share on other sites

ThanosGecko    0

ThanosGecko

ThanosGecko    0

  • Tree Puncher
  • ThanosGecko
  • Members
  • 0
  • 5 posts
Posted April 3, 2020
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.

  • Quote

Share this post


Link to post
Share on other sites

ThanosGecko    0

ThanosGecko

ThanosGecko    0

  • Tree Puncher
  • ThanosGecko
  • Members
  • 0
  • 5 posts
Posted April 3, 2020

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

  • Quote

Share this post


Link to post
Share on other sites

ThanosGecko    0

ThanosGecko

ThanosGecko    0

  • Tree Puncher
  • ThanosGecko
  • Members
  • 0
  • 5 posts
Posted April 3, 2020

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;
	}

 

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • __dwagon
      Forge keeps crashing

      By __dwagon · Posted 25 minutes ago

      Hey im back with information that not only 1.8.9 is crashing but also 1.16 as well. I don't know what to do I have redownoaded minecraft, forge, and java multiple times and nothing seems to work. Please help
    • piglinplayz
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By piglinplayz · Posted 1 hour ago

      i can find the it ij just says no 1.12.2 no 1.16.3
    • loordgek
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By loordgek · Posted 1 hour ago

      no search for your self it is not hard
    • piglinplayz
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By piglinplayz · Posted 1 hour ago

      or may i have the link?????????????????????????????????????????????????? Plz i need a respond ASAP because i need it for a moded smp 
    • Silivek
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By Silivek · Posted 1 hour ago

      Macaw's Doors may have one and there is a mod called Little Tiles that you can create one in.
  • Topics

    • __dwagon
      0
      Forge keeps crashing

      By __dwagon
      Started 26 minutes ago

    • piglinplayz
      7
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By piglinplayz
      Started 2 hours ago

    • piglinplayz
      9
      How do update a 1.12.2 mod to 1.16.3

      By piglinplayz
      Started 2 hours ago

    • BeastGamerYo
      1
      Urgent Help Forge Is Crashing!!!

      By BeastGamerYo
      Started 2 hours ago

    • __dwagon
      1
      1.8.9 keeps crashing

      By __dwagon
      Started 2 hours ago

  • Who's Online (See full list)

    • Luis_ST
    • __dwagon
    • TheidenHD
    • Draco18s
    • TheDonkey_King
    • JortVeenstra
    • CookieLukas
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Make custom dimension that is based on the nether a surface world
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community