mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-24 23:23:44 +02:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			chore/v7/r
			...
			fix/wrong-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 2633aa41a0 | 
| @@ -114,26 +114,14 @@ public abstract class SquarePlotManager extends GridPlotManager { | ||||
|             end = pathWidthLower + squarePlotWorld.PLOT_WIDTH; | ||||
|         } | ||||
|         int size = squarePlotWorld.PLOT_WIDTH + squarePlotWorld.ROAD_WIDTH; | ||||
|         int idx; | ||||
|         if (x < 0) { | ||||
|             idx = x / size; | ||||
|             x = size + (x % size); | ||||
|         } else { | ||||
|             idx = (x / size) + 1; | ||||
|             x = x % size; | ||||
|         } | ||||
|         int idz; | ||||
|         if (z < 0) { | ||||
|             idz = z / size; | ||||
|             z = size + (z % size); | ||||
|         } else { | ||||
|             idz = (z / size) + 1; | ||||
|             z = z % size; | ||||
|         } | ||||
|         if (z <= pathWidthLower || z > end || x <= pathWidthLower || x > end) { | ||||
|         int dx = Math.floorDiv(x, size) + 1; | ||||
|         int rx = Math.floorMod(x, size); | ||||
|         int dz = Math.floorDiv(z, size) + 1; | ||||
|         int rz = Math.floorMod(z, size); | ||||
|         if (rz <= pathWidthLower || rz > end || rx <= pathWidthLower || rx > end) { | ||||
|             return null; | ||||
|         } else { | ||||
|             return PlotId.of(idx, idz); | ||||
|             return PlotId.of(dx, dz); | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -180,24 +168,10 @@ public abstract class SquarePlotManager extends GridPlotManager { | ||||
|                 } | ||||
|                 end = pathWidthLower + squarePlotWorld.PLOT_WIDTH; | ||||
|             } | ||||
|             int dx; | ||||
|             int rx; | ||||
|             if (x < 0) { | ||||
|                 dx = x / size; | ||||
|                 rx = size + (x % size); | ||||
|             } else { | ||||
|                 dx = (x / size) + 1; | ||||
|                 rx = x % size; | ||||
|             } | ||||
|             int dz; | ||||
|             int rz; | ||||
|             if (z < 0) { | ||||
|                 dz = z / size; | ||||
|                 rz = size + (z % size); | ||||
|             } else { | ||||
|                 dz = (z / size) + 1; | ||||
|                 rz = z % size; | ||||
|             } | ||||
|             int dx = Math.floorDiv(x, size) + 1; | ||||
|             int rx = Math.floorMod(x, size); | ||||
|             int dz = Math.floorDiv(z, size) + 1; | ||||
|             int rz = Math.floorMod(z, size); | ||||
|             PlotId id = PlotId.of(dx, dz); | ||||
|             boolean[] merged = new boolean[]{rz <= pathWidthLower, rx > end, rz > end, rx <= pathWidthLower}; | ||||
|             int hash = HashUtil.hash(merged); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user