Change Moon texture on specific Dimension (no plugins)

Started by gustavowizard123 on

Topic category: Help with MCreator software

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Change Moon texture on specific Dimension (no plugins)

since now World Renderer is not being updated, and for people that dont want plugins anymore, 

is there a way to make custom moon/sun textures for specific dimensions?

all space mods need this.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you might be able to use…
Sat, 10/25/2025 - 12:19

you might be able to use this,

you'd have to use custom code blocks since you don't want a plugin

 

the first block,

if (world.isClientSide()) {
				TextureManager _textureManager = Minecraft.getInstance().getTextureManager();
				_textureManager.register(ResourceLocation.parse("minecraft:textures/environment/moon_phases.png"), _textureManager.getTexture(ResourceLocation.parse("minecraft:textures/block/dirt.png")));
			}

 

the second block,

if (world.isClientSide()) {
				Minecraft.getInstance().getTextureManager().release(ResourceLocation.parse("minecraft:textures/environment/moon_phases.png"));
			}			

the third block,

if (world.isClientSide()) {
				Minecraft.getInstance().getTextureManager().release(ResourceLocation.parse("minecraft:textures/block/dirt.png"));
			}
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hum thats not a bad idea,…
Sun, 10/26/2025 - 08:25

hum thats not a bad idea, did you test these codes? btw why u need to replace back the dirt in this case? wasnt just the moon texture that was replaced?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah it works, if you don't…
Sun, 10/26/2025 - 08:27

yeah it works, if you don't reset the dirt texture you can't reapply it to the moon later

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
bro u are my personal hero!…
Sun, 10/26/2025 - 08:52

bro u are my personal hero! it worked when i made the moon texture just like the vanilla one, with 8 phase variations! thanks a lot! i still dont know why i need that 3rd block thou

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
don't call me bro.   you can…
Sun, 10/26/2025 - 08:57

don't call me bro.

 

you can try not using the 3rd block. to test it you should have the moon texture switch twice like,
vanilla -> your texture -> vanilla -> your texture

without the 3rd block the moon should disappear when you try to switch it to your texture the second time

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh i see now why i need the…
Sun, 10/26/2025 - 09:07

oh i see now why i need the 3rd! i made this work on PlayerTickUpdate only thou, wont work on PlayerJoinDimension

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry for calling u 'bro'…
Sun, 10/26/2025 - 09:13

sorry for calling u 'bro' LOL i just got excited that it works, thanks again!

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i found all i need on the…
Sun, 10/26/2025 - 09:15

i found all i need on the environment folder of minecraft, except the sky, i think thats is procedure genrated right.. but the color of sky i can change on the dimension element, so all good :) do you think the performance is impacted with using all this on playerTick?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it should be fine on player…
Sun, 10/26/2025 - 09:17

it should be fine on player tick, just make sure it's not running on the server, since it doesn't need to.

 

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah i did! thank you again!…
Sun, 10/26/2025 - 09:22

yeah i did! thank you again! you rock!

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh another question - if i…
Sun, 10/26/2025 - 09:25

oh another question - if i add a 3rd dimension, and another moon texture, when i get back to earth (overworld) i need to reset them both i supose? or i just reset the one i was visiting? like for example:

 

Is Client Side (PlayerTickUpdate):

IF Entity is on Dimension = Moon

Code 1 - replace with Moon Moon

ELSE IF Entity is on Dimension = Marts

Code 1 - repalce with Mars Moon

ELSE

Reset Earth Moon

Reset Mars Moon

Reset Moon Moon

?

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
or for example - if the…
Sun, 10/26/2025 - 09:26

or for example - if the player is on Mars, he need to reset Moon and Earth textures ?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you'd only need to reset the…
Sun, 10/26/2025 - 09:29

you'd only need to reset the one that was visited, but if resetting all of them is easier it probably wouldn't hurt to do it.

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
on the first code, if i want…
Sun, 10/26/2025 - 09:35

on the first code, if i want to add another replace, like the sun:

if (world.isClientSide()) {
TextureManager _textureManager = Minecraft.getInstance().getTextureManager();
_textureManager.register(ResourceLocation.parse("minecraft:textures/environment/moon_phases.png"), _textureManager.getTexture(ResourceLocation.parse("minecraft:textures/block/dirt.png")));
}

 

i just add 2 more lines here?

textureManager.register(ResourceLocation.parse("minecraft:textures/environment/sun.png"), textureManager.getTexture(ResourceLocation.parse("minecraft:textures/environment/sunnew.png")));