Slight cleanup of PlacingSchematicTest.
import org.spongepowered.api.world.schematic.PaletteTypes;
import org.spongepowered.api.world.schematic.Schematic;
import org.spongepowered.api.world.storage.WorldProperties;
+import org.spongepowered.common.SpongeImpl;
+import org.spongepowered.common.SpongeImplHooks;
import org.spongepowered.common.regression.registry.Test1Tile;
import org.spongepowered.common.regression.registry.Test2Tile;
import org.spongepowered.common.regression.registry.Test3Tile;
@@ -90,11 +92,11 @@ public static void setupSchematic() {
@Test
public void createSchematic() throws Throwable {
- final World world = this.testUtils.runOnMainThread(() -> {
+ this.testUtils.runOnMainThread(() -> {
final WorldArchetype schematics = WorldArchetype.builder().from(WorldArchetypes.THE_VOID)
.gameMode(GameModes.CREATIVE)
- .build("schematic", "schematics");
- final WorldProperties properties = Sponge.getServer().createWorldProperties("schematicstest", schematics);
+ .build(SpongeImpl.ECOSYSTEM_ID + ":schematica", "Schematica");
+ final WorldProperties properties = Sponge.getServer().createWorldProperties("schematica", schematics);
final World schematica = Sponge.getServer().loadWorld(properties).get();
final Player player = this.testUtils.getThePlayer();
player.offer(Keys.GAME_MODE, GameModes.CREATIVE);
@@ -132,7 +134,7 @@ public void createSchematic() throws Throwable {
.metaValue(Schematic.METADATA_NAME, "placement")
.blockPaletteType(PaletteTypes.LOCAL_BLOCKS)
.build();
- assertEquals("The recreated schematic from world should equal the deserialized schematic", toPlace, recreated);
+ assertEquals("The recreated schematic from world should equal the de-serialized schematic", toPlace, recreated);
final Schematic deserialized = DataTranslators.SCHEMATIC.translate(DataTranslators.SCHEMATIC.translate(recreated));
/*
This assertion proves the following:
@@ -144,7 +146,7 @@ public void createSchematic() throws Throwable {
- Schematics that contain extra data attached to tile entities are retained, but the engine
may not respect those when a new schematic is created from the placed original schematic
*/
- assertEquals("The deserialized recreated schematic should equal the original deserialized schematic", toPlace, deserialized);
+ assertEquals("The de-serialized recreated schematic should equal the original deserialized schematic", toPlace, deserialized);
return schematica;
});
this.testUtils.waitForWorldChunks();
@@ -160,8 +162,6 @@ public void createSchematic() throws Throwable {
DataContainer container = DataFormats.NBT.readFrom(new GZIPInputStream(new FileInputStream(inputFile)));
// Up next: test loading and saving v1 schematics.
-
}
-
}
