From 0be21f573512b801cdcb735ea87949d7a0c1dcdc Mon Sep 17 00:00:00 2001 From: Swastik Garg Date: Wed, 8 Mar 2017 23:55:06 +0530 Subject: [PATCH 1/3] fixed #2429 Previewing an unsupported world breaks world preview for remainder of game session --- .../rendering/nui/layers/mainMenu/CreateGameScreen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/CreateGameScreen.java b/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/CreateGameScreen.java index 09f0bc23ff5..0774a68bc01 100644 --- a/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/CreateGameScreen.java +++ b/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/CreateGameScreen.java @@ -256,8 +256,8 @@ public Boolean get() { } }; previewSeed.bindEnabled(worldGeneratorSelected); + PreviewWorldScreen screen = getManager().createScreen(PreviewWorldScreen.ASSET_URI, PreviewWorldScreen.class); WidgetUtil.trySubscribe(this, "previewSeed", button -> { - PreviewWorldScreen screen = getManager().createScreen(PreviewWorldScreen.ASSET_URI, PreviewWorldScreen.class); if (screen != null) { screen.bindSeed(BindHelper.bindBeanProperty("text", seed, String.class)); try { From 5620877bad77a005a4dfbf74d10824cf06fc517a Mon Sep 17 00:00:00 2001 From: Swastik Garg Date: Thu, 9 Mar 2017 00:50:27 +0530 Subject: [PATCH 2/3] Partially fixes #2509 The part where exiting from create game after previewing and re-entering again crashes the game --- .../rendering/nui/layers/mainMenu/SelectGameScreen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/SelectGameScreen.java b/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/SelectGameScreen.java index 437cca6e307..f7404c57131 100644 --- a/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/SelectGameScreen.java +++ b/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/SelectGameScreen.java @@ -84,8 +84,8 @@ public String get() { refreshList(gameList); gameList.subscribe((widget, item) -> loadGame(item)); + CreateGameScreen screen = getManager().createScreen(CreateGameScreen.ASSET_URI, CreateGameScreen.class); WidgetUtil.trySubscribe(this, "create", button -> { - CreateGameScreen screen = getManager().createScreen(CreateGameScreen.ASSET_URI, CreateGameScreen.class); screen.setLoadingAsServer(loadingAsServer); triggerForwardAnimation(screen); }); From a5b1c8ea9a8cb04f2883bcfd96d90c5de507708e Mon Sep 17 00:00:00 2001 From: Swastik Garg Date: Sun, 12 Mar 2017 22:29:57 +0530 Subject: [PATCH 3/3] for fixing preview of tta world gen --- .../terasology/world/generation/BaseFacetedWorldGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/main/java/org/terasology/world/generation/BaseFacetedWorldGenerator.java b/engine/src/main/java/org/terasology/world/generation/BaseFacetedWorldGenerator.java index 171d8f1ffd7..8f6c1bfb101 100644 --- a/engine/src/main/java/org/terasology/world/generation/BaseFacetedWorldGenerator.java +++ b/engine/src/main/java/org/terasology/world/generation/BaseFacetedWorldGenerator.java @@ -25,7 +25,7 @@ public abstract class BaseFacetedWorldGenerator implements WorldGenerator { private final SimpleUri uri; private String worldSeed; - private WorldBuilder worldBuilder; + protected WorldBuilder worldBuilder; private World world; private FacetedWorldConfigurator configurator;