From 8c56affb2f04e9da882756a59905364db879baae Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 25 Apr 2016 03:58:37 +1000 Subject: [PATCH] Fix for paint --- .../com/intellectualcrafters/plot/object/Plot.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java index fd44313fd..9998a8b19 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -2390,7 +2390,7 @@ public class Plot { return regions_cache; } HashSet plots = this.getConnectedPlots(); - regions_cache = new HashSet<>(); + HashSet regions = regions_cache = new HashSet<>(); HashSet visited = new HashSet<>(); for (Plot current : plots) { if (visited.contains(current.getId())) { @@ -2462,9 +2462,9 @@ public class Plot { Location toploc = plot.getExtendedTopAbs(); Location botabs = plot.getBottomAbs(); Location topabs = plot.getTopAbs(); - regions_cache.add(new RegionWrapper(botabs.getX(), topabs.getX(), topabs.getZ() + 1, toploc.getZ())); + regions.add(new RegionWrapper(botabs.getX(), topabs.getX(), topabs.getZ() + 1, toploc.getZ())); if (plot.getMerged(5)) { - regions_cache.add(new RegionWrapper(topabs.getX() + 1, toploc.getX(), topabs.getZ() + 1, toploc.getZ())); + regions.add(new RegionWrapper(topabs.getX() + 1, toploc.getX(), topabs.getZ() + 1, toploc.getZ())); // intersection } } @@ -2477,16 +2477,16 @@ public class Plot { Location toploc = plot.getExtendedTopAbs(); Location botabs = plot.getBottomAbs(); Location topabs = plot.getTopAbs(); - regions_cache.add(new RegionWrapper(topabs.getX() + 1, toploc.getX(), botabs.getZ(), topabs.getZ())); + regions.add(new RegionWrapper(topabs.getX() + 1, toploc.getX(), botabs.getZ(), topabs.getZ())); if (plot.getMerged(5)) { - regions_cache.add(new RegionWrapper(topabs.getX() + 1, toploc.getX(), topabs.getZ() + 1, toploc.getZ())); + regions.add(new RegionWrapper(topabs.getX() + 1, toploc.getX(), topabs.getZ() + 1, toploc.getZ())); // intersection } } } - regions_cache.add(new RegionWrapper(gbotabs.getX(), gtopabs.getX(), gbotabs.getZ(), gtopabs.getZ())); + regions.add(new RegionWrapper(gbotabs.getX(), gtopabs.getX(), gbotabs.getZ(), gtopabs.getZ())); } - return regions_cache; + return regions; } /**