Shutup Experimental Settings!

Shutup Experimental Settings!

36M Downloads

Improvement to the system

Speiger opened this issue ยท 3 comments

commented

o/ found this mod since porting one of my mods to 1.19
And I found a way to remove the issue even if your mod is not installed anymore.

Instead of Removing "info received" and the rendering of the "Warning" symbol you could just outright remove the "experimental" flag being set.

Its actually fairly simple.

@Mixin(WorldGenSettingsComponent.class)
public class CreateWorldScreen
{
	@Shadow
	WorldCreationContext settings;
	
	@Overwrite
	void updateSettings(WorldCreationContext setting) {
		settings = new WorldCreationContext(setting.worldGenSettings(), Lifecycle.stable(), setting.registryAccess(), setting.dataPackResources());
	}
}

This is the code i am using and that removes the warning even if your mod was removed afterwards (on existing worlds). Though it does not fix it with servers. Which I think doesn't even have a warning included.

A overwrite might be excessive and a "Inject" might be more then enough but this was just a proof of concept.

commented

Yeah no that doesn't fix everything. I was wrong after some more extensive testing.
But mine fixes the case where it asks on world creation.

commented

It gets rid of the "warning" when you create a world not join.

commented

o/ found this mod since porting one of my mods to 1.19 And I found a way to remove the issue even if your mod is not installed anymore.

Instead of Removing "info received" and the rendering of the "Warning" symbol you could just outright remove the "experimental" flag being set.

Its actually fairly simple.

@Mixin(WorldGenSettingsComponent.class)
public class CreateWorldScreen
{
	@Shadow
	WorldCreationContext settings;
	
	@Overwrite
	void updateSettings(WorldCreationContext setting) {
		settings = new WorldCreationContext(setting.worldGenSettings(), Lifecycle.stable(), setting.registryAccess(), setting.dataPackResources());
	}
}

This is the code i am using and that removes the warning even if your mod was removed afterwards (on existing worlds). Though it does not fix it with servers. Which I think doesn't even have a warning included.

A overwrite might be excessive and a "Inject" might be more then enough but this was just a proof of concept.

Tried this but still shows when creating and the first time entering. How does this code work btw?