forked from SteamWar/SteamWar
Cleanup stuff
This commit is contained in:
+1
-7
@@ -40,7 +40,6 @@ import java.util.stream.Stream;
|
||||
|
||||
public class DynamicRegionSystem implements RegionSystem {
|
||||
|
||||
private static final int TILE_SIZE_ADJUSTED = Tile.tileSize - 1;
|
||||
public static DynamicRegionSystem INSTANCE;
|
||||
|
||||
private static final Map<Long, Region> regionCache = new LinkedHashMap<>(16, 0.75f, true) {
|
||||
@@ -140,11 +139,6 @@ public class DynamicRegionSystem implements RegionSystem {
|
||||
return region;
|
||||
}
|
||||
|
||||
private Region get(int x, int z, boolean fastCache, Collection<Region> regions) {
|
||||
Tile tile = Tile.fromXZ(x, z).orElse(null);
|
||||
return get(tile, fastCache, regions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Region get(@NonNull Location location) {
|
||||
return get(Tile.fromLocation(location).orElse(null), true, regionMap.values());
|
||||
@@ -244,7 +238,7 @@ public class DynamicRegionSystem implements RegionSystem {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Stream<Region> getConnectedRegions(Region region) {
|
||||
public Stream<Region> getConnectedRegions(@NonNull Region region) {
|
||||
Set<Region> regions = regionTypeMap.get(region.getType());
|
||||
|
||||
Set<Region> connected = new HashSet<>();
|
||||
|
||||
Reference in New Issue
Block a user