entityManager = builder.build(moduleManager.getEnvironment(), networkSystem, new ReflectionReflectFactory());
worldStub = new WorldProviderCoreStub();
worldProvider = new EntityAwareWorldProvider(worldStub, entityManager);
plainBlock = new Block();
blockManager.addBlockFamily(new SymmetricFamily(new BlockUri("test:plainBlock"), plainBlock), true);
blockWithString = new Block();
PrefabData prefabData = new PrefabData();
prefabData.addComponent(new StringComponent("Test"));
Assets.generateAsset(new AssetUri(AssetType.PREFAB, "test:prefabWithString"), prefabData, Prefab.class);
blockWithString.setPrefab("test:prefabWithString");
blockManager.addBlockFamily(new SymmetricFamily(new BlockUri("test:blockWithString"), blockWithString), true);
blockWithDifferentString = new Block();
prefabData = new PrefabData();
prefabData.addComponent(new StringComponent("Test2"));
Assets.generateAsset(
new AssetUri(AssetType.PREFAB, "test:prefabWithDifferentString"), prefabData, Prefab.class);
blockWithDifferentString.setPrefab("test:prefabWithDifferentString");
blockManager.addBlockFamily(new SymmetricFamily(new BlockUri("test:blockWithDifferentString"), blockWithDifferentString), true);
blockWithRetainedComponent = new Block();
prefabData = new PrefabData();
prefabData.addComponent(new RetainedOnBlockChangeComponent(3));
Assets.generateAsset(
new AssetUri(AssetType.PREFAB, "test:prefabWithRetainedComponent"), prefabData, Prefab.class);
blockWithRetainedComponent.setPrefab("test:prefabWithRetainedComponent");
blockManager.addBlockFamily(new SymmetricFamily(new BlockUri("test:blockWithRetainedComponent"), blockWithRetainedComponent), true);
blockInFamilyOne = new Block();
blockInFamilyOne.setKeepActive(true);
blockInFamilyOne.setPrefab("test:prefabWithString");
blockInFamilyTwo = new Block();
blockInFamilyTwo.setPrefab("test:prefabWithString");
blockInFamilyTwo.setKeepActive(true);
blockManager.addBlockFamily(new HorizontalBlockFamily(new BlockUri("test:blockFamily"),
ImmutableMap.<Side, Block>of(Side.FRONT, blockInFamilyOne, Side.LEFT, blockInFamilyTwo, Side.RIGHT, blockInFamilyTwo, Side.BACK, blockInFamilyOne),
Collections.<String>emptyList()), true);
keepActiveBlock = new Block();
keepActiveBlock.setKeepActive(true);
keepActiveBlock.setPrefab("test:prefabWithString");
blockManager.addBlockFamily(new SymmetricFamily(new BlockUri("test:keepActiveBlock"), keepActiveBlock), true);
worldProvider.initialise();
}