Fixed superflat world customization with 'default to bop worldtype' config option enabled. Closes #686

This commit is contained in:
Adubbz 2016-12-03 09:03:20 +11:00
parent 7eb131681d
commit a28a7123af

View file

@ -12,6 +12,7 @@ import biomesoplenty.common.config.MiscConfigurationHandler;
import biomesoplenty.common.init.ModBiomes;
import net.minecraft.client.gui.GuiCreateWorld;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.world.WorldType;
import net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
@ -29,7 +30,9 @@ public class GuiEventHandler
{
GuiCreateWorld createWorldGui = (GuiCreateWorld)screenGui;
createWorldGui.selectedIndex = ModBiomes.worldTypeBOP.getWorldTypeID();
// Do not change back when returning from the 'Customize' screen
if (createWorldGui.selectedIndex == WorldType.DEFAULT.getWorldTypeID())
createWorldGui.selectedIndex = ModBiomes.worldTypeBOP.getWorldTypeID();
}
}
}