mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-08 09:17:38 +01:00
Still not working :/ Need to simulate worlds now...
This commit is contained in:
parent
e45ae8f9dc
commit
728002ecce
@ -41,15 +41,24 @@ public class TestWorldImport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(Object creator) {
|
public boolean matches(Object creator) {
|
||||||
|
System.out.println("Checking world creators.");
|
||||||
if (!((WorldCreator) creator).name().equals(this.worldCreator.name())) {
|
if (!((WorldCreator) creator).name().equals(this.worldCreator.name())) {
|
||||||
|
System.out.println("Checking Names...");
|
||||||
return false;
|
return false;
|
||||||
} else if (!((WorldCreator) creator).environment().equals(this.worldCreator.environment())) {
|
} else if (!((WorldCreator) creator).environment().equals(this.worldCreator.environment())) {
|
||||||
return false;
|
System.out.println("Checking Environments...");
|
||||||
} else if (((WorldCreator) creator).seed() != this.worldCreator.seed()) {
|
|
||||||
return false;
|
|
||||||
} else if (!((WorldCreator) creator).generator().equals(this.worldCreator.generator())) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Don't check the seed by default, as it's randomized.
|
||||||
|
// else if (((WorldCreator) creator).seed() != this.worldCreator.seed()) {
|
||||||
|
// System.out.print("Checking Seeds...");
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// else if (!((WorldCreator) creator).generator().equals(this.worldCreator.generator())) {
|
||||||
|
// System.out.print("Checking Gens...");
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
System.out.println("Creators matched!!!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,10 +82,13 @@ public class TestWorldImport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(Object creator) {
|
public boolean matches(Object creator) {
|
||||||
if(super.l == null || creator == null) {
|
System.out.println("Checking above...");
|
||||||
|
if (super.l == null || creator == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ((Location) creator).getBlockY() > super.l.getBlockY();
|
boolean equal = ((Location) creator).getBlockY() > super.l.getBlockY();
|
||||||
|
System.out.println("Checking equals/\\..." + equal);
|
||||||
|
return equal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,10 +99,12 @@ public class TestWorldImport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(Object creator) {
|
public boolean matches(Object creator) {
|
||||||
if(super.l == null || creator == null) {
|
if (super.l == null || creator == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ((Location) creator).getBlockY() < super.l.getBlockY();
|
boolean equal = ((Location) creator).getBlockY() <= super.l.getBlockY();
|
||||||
|
System.out.println("Checking equals\\/..." + equal);
|
||||||
|
return equal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,10 +128,10 @@ public class TestWorldImport {
|
|||||||
when(this.mockWorld.getEnvironment()).thenReturn(World.Environment.NORMAL);
|
when(this.mockWorld.getEnvironment()).thenReturn(World.Environment.NORMAL);
|
||||||
when(this.mockWorld.getSpawnLocation()).thenReturn(new Location(this.mockWorld, 0, 0, 0));
|
when(this.mockWorld.getSpawnLocation()).thenReturn(new Location(this.mockWorld, 0, 0, 0));
|
||||||
// Build a small platform that a player can stand on:
|
// Build a small platform that a player can stand on:
|
||||||
LocationMatcherAbove matchWorldAbove = new LocationMatcherAbove(new Location(this.mockWorld, 0,0,0));
|
LocationMatcherAbove matchWorldAbove = new LocationMatcherAbove(new Location(this.mockWorld, 0, 0, 0));
|
||||||
LocationMatcherBelow matchWorldBelow = new LocationMatcherBelow(new Location(this.mockWorld, 0,0,0));
|
LocationMatcherBelow matchWorldBelow = new LocationMatcherBelow(new Location(this.mockWorld, 0, 0, 0));
|
||||||
when(this.mockWorld.getBlockAt(Matchers.argThat(matchWorldAbove))).thenReturn(new MockBlock(new Location(this.mockWorld, 0,0,0), Material.AIR));
|
when(this.mockWorld.getBlockAt(Matchers.argThat(matchWorldAbove))).thenReturn(new MockBlock(new Location(this.mockWorld, 0, 0, 0), Material.AIR));
|
||||||
when(this.mockWorld.getBlockAt(Matchers.argThat(matchWorldBelow))).thenReturn(new MockBlock(new Location(this.mockWorld, 0,0,0), Material.STONE));
|
when(this.mockWorld.getBlockAt(Matchers.argThat(matchWorldBelow))).thenReturn(new MockBlock(new Location(this.mockWorld, 0, 0, 0), Material.STONE));
|
||||||
|
|
||||||
this.mockNetherWorld = mock(World.class);
|
this.mockNetherWorld = mock(World.class);
|
||||||
when(this.mockNetherWorld.getName()).thenReturn("world_nether");
|
when(this.mockNetherWorld.getName()).thenReturn("world_nether");
|
||||||
|
Loading…
Reference in New Issue
Block a user