Change fog density and global illumination

Started by Keerian on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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
Joined Nov 2019
Points:

User statistics:

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

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

Joined Apr 2020
Points:

User statistics:

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

Where do I find that?

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Joined Apr 2020
Points:

User statistics:

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

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

Joined Nov 2019
Points:

User statistics:

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

its in the WorldProviderMod class