(Position position, Position cap)
| 207 | } |
| 208 | |
| 209 | public static Position capBelow(Position position, Position cap) { |
| 210 | if (position == null || cap == null) { |
| 211 | Loggger.warn("Position null"); |
| 212 | return null; |
| 213 | } |
| 214 | Position target = position.copy(); |
| 215 | if (target.getX() >= cap.getX()) { |
| 216 | target.x = cap.x - 1; |
| 217 | } |
| 218 | if (target.getY() >= cap.getY()) { |
| 219 | target.y = cap.y - 1; |
| 220 | } |
| 221 | if (target.getZ() >= cap.getZ()) { |
| 222 | target.z = cap.z - 1; |
| 223 | } |
| 224 | return target; |
| 225 | } |
| 226 | |
| 227 | public int compareTo(Position other) { |
| 228 | // TODO |