Change fog density and global illumination

Started by Keerian on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Apr 2020
Points:
617

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
Change fog density and global illumination
Wed, 04/29/2020 - 23:39 (edited)

Hello amazing modders!

I am in need of help here. I just started modding on MCreator and love the fog option for the dimension element however I would like to change its density (to be even more dense).

Here is where the fog settings are located in the code:

 

 

		@Override
		@OnlyIn(Dist.CLIENT)
		public Vec3d getFogColor(float cangle, float ticks) {
			return new Vec3d(0.4, 0, 0);
		}

		@Override
		public ChunkGenerator<?> createChunkGenerator() {
			if (this.biomeProviderCustom == null) {
				this.biomeProviderCustom = new BiomeProviderCustom(this.world);
			}
			return new ChunkProviderModded(this.world, this.biomeProviderCustom);
		}

		@Override
		public boolean isSurfaceWorld() {
			return true;
		}

		@Override
		public boolean canRespawnHere() {
			return true;
		}

		@OnlyIn(Dist.CLIENT)
		@Override
		public boolean doesXZShowFog(int x, int z) {
			return true;
		}

 

 

And second question is how do I change the amount of global illumination? When activated everything is dark nearly pitch black. I would like to have it less dark.

I'm trying to create a mystical dark forest. Everything happens in a dimension I created where it's constantly night.

What it looks like for now:

What it looks like for now.

Edited by Keerian on Wed, 04/29/2020 - 23:39
Active 3 years ago
Joined Nov 2019
Points:
867

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 387
brightness of the dimension…
Thu, 04/30/2020 - 10:19

brightness of the dimension is set in generateLightBrightnessTable method. override it to change brightness

Active 4 years ago
Joined Apr 2020
Points:
617

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
Where do I find that?
Thu, 04/30/2020 - 13:44

Where do I find that?

Active 3 years ago
Joined Nov 2019
Points:
867

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 387
when you create the…
Thu, 04/30/2020 - 15:17

when you create the dimension using mcreator, do not check the "Disable global light source" checkbox. After saving your mod element, mcreator will generate that piece of code.

Active 4 years ago
Joined Apr 2020
Points:
617

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
Well that's weird. It did…
Thu, 04/30/2020 - 16:57

Well that's weird. It did not generate the code at all.

Active 3 years ago
Joined Nov 2019
Points:
867

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 387
its in the WorldProviderMod…
Thu, 04/30/2020 - 21:06

its in the WorldProviderMod class