From 1bbc7402ba8cf9ecc40659f089f6d0fbd9a916b0 Mon Sep 17 00:00:00 2001 From: Cervator Date: Sun, 17 Jun 2018 22:11:46 -0400 Subject: [PATCH] Further conflict resolution: work out clashing logical changes for some UI workflow plus a block family fix --- .../rendering/nui/layers/mainMenu/CreateGameScreen.java | 6 +----- .../rendering/nui/layers/mainMenu/SelectGameScreen.java | 4 ++-- .../rendering/nui/layers/mainMenu/UniverseSetupScreen.java | 7 +++---- 3 files changed, 6 insertions(+), 11 deletions(-) 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 5b92c713680..c2a9597b991 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 @@ -91,11 +91,7 @@ public class CreateGameScreen extends CoreScreenLayer { @In private Config config; - private boolean loadingAsServer; - - /** - * A UniverseWrapper object used here to determine if the game is single-player or multi-player. - */ + /** A UniverseWrapper object used here to determine if the game is single-player or multi-player.*/ private UniverseWrapper universeWrapper; @Override 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 29e24adf032..c6e64656149 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 @@ -200,8 +200,8 @@ public void onOpened() { super.onOpened(); if (GameProvider.getSavedGames().isEmpty()) { - CreateGameScreen screen = getManager().createScreen(CreateGameScreen.ASSET_URI, CreateGameScreen.class); - screen.setLoadingAsServer(isLoadingAsServer()); + NewGameScreen screen = getManager().createScreen(NewGameScreen.ASSET_URI, NewGameScreen.class); + screen.setUniverseWrapper(universeWrapper); getManager().pushScreen(screen); } diff --git a/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/UniverseSetupScreen.java b/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/UniverseSetupScreen.java index 9364e8b0502..942f356c7a3 100644 --- a/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/UniverseSetupScreen.java +++ b/engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/UniverseSetupScreen.java @@ -55,8 +55,7 @@ import org.terasology.rendering.nui.skin.UISkinData; import org.terasology.rendering.nui.widgets.UIDropdownScrollable; import org.terasology.rendering.world.WorldSetupWrapper; -import org.terasology.world.block.family.BlockFamilyFactoryRegistry; -import org.terasology.world.block.family.DefaultBlockFamilyFactoryRegistry; +import org.terasology.world.block.family.BlockFamilyRegistry; import org.terasology.world.block.loader.BlockFamilyDefinition; import org.terasology.world.block.loader.BlockFamilyDefinitionData; import org.terasology.world.block.loader.BlockFamilyDefinitionFormat; @@ -299,8 +298,8 @@ public void setEnvironment(UniverseWrapper wrapper) { } private void initAssets() { - DefaultBlockFamilyFactoryRegistry familyFactoryRegistry = new DefaultBlockFamilyFactoryRegistry(); - context.put(BlockFamilyFactoryRegistry.class, familyFactoryRegistry); + BlockFamilyRegistry familyFactoryRegistry = new BlockFamilyRegistry(); + context.put(BlockFamilyRegistry.class, familyFactoryRegistry); // cast lambdas explicitly to avoid inconsistent compiler behavior wrt. type inference assetTypeManager.registerCoreAssetType(Prefab.class,