Fix test for clearArea

This commit is contained in:
tastybento 2021-01-04 22:53:11 -08:00
parent 78b10cb7bf
commit 86af7b568c

View File

@ -265,16 +265,21 @@ public class IslandsManagerTest {
// Monsters and animals // Monsters and animals
when(zombie.getLocation()).thenReturn(location); when(zombie.getLocation()).thenReturn(location);
when(zombie.getType()).thenReturn(EntityType.ZOMBIE); when(zombie.getType()).thenReturn(EntityType.ZOMBIE);
when(zombie.getRemoveWhenFarAway()).thenReturn(true);
when(slime.getLocation()).thenReturn(location); when(slime.getLocation()).thenReturn(location);
when(slime.getType()).thenReturn(EntityType.SLIME); when(slime.getType()).thenReturn(EntityType.SLIME);
when(slime.getRemoveWhenFarAway()).thenReturn(true);
when(cow.getLocation()).thenReturn(location); when(cow.getLocation()).thenReturn(location);
when(cow.getType()).thenReturn(EntityType.COW); when(cow.getType()).thenReturn(EntityType.COW);
when(wither.getType()).thenReturn(EntityType.WITHER); when(wither.getType()).thenReturn(EntityType.WITHER);
when(wither.getRemoveWhenFarAway()).thenReturn(true);
when(creeper.getType()).thenReturn(EntityType.CREEPER); when(creeper.getType()).thenReturn(EntityType.CREEPER);
when(creeper.getRemoveWhenFarAway()).thenReturn(true);
when(pufferfish.getType()).thenReturn(EntityType.PUFFERFISH); when(pufferfish.getType()).thenReturn(EntityType.PUFFERFISH);
// Named monster // Named monster
when(skelly.getType()).thenReturn(EntityType.SKELETON); when(skelly.getType()).thenReturn(EntityType.SKELETON);
when(skelly.getCustomName()).thenReturn("Skelly"); when(skelly.getCustomName()).thenReturn("Skelly");
when(skelly.getRemoveWhenFarAway()).thenReturn(true);
Collection<Entity> collection = new ArrayList<>(); Collection<Entity> collection = new ArrayList<>();
collection.add(player); collection.add(player);
@ -521,7 +526,7 @@ public class IslandsManagerTest {
when(ground.getState()).thenReturn(blockState); when(ground.getState()).thenReturn(blockState);
// Negative value = full island scan // Negative value = full island scan
// No island here yet // No island here yet
assertNull(manager.bigScan(location, -1)); assertNull(manager.bigScan(location, -1));
} }