Cleanup stuff

This commit is contained in:
2026-08-13 17:42:22 +02:00
parent c47d950f2e
commit b5f7d13952
20 changed files with 22 additions and 161 deletions
@@ -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<>();