Distance between colonies needs to be changed (proof)
Graepix opened this issue ยท 2 comments
Minecolonies version
Version:
Expected behavior
- When trying to create a colony on a multiplayer server the minimum place distance should be the higher than the distance from a town hall to the colony's farthest point, its corner, plus 16 blocks since the town hall block isn't always in the exact center of a chunk
Actual behaviour
- The minimum distance is 300, and the suggested distance is 401 blocks.
Steps to reproduce the problem
- Givens: The Pythagorean Theorem a^2 + b^2 = c^2 , A colony is 17 chunks by 17 chunks. Assumptions: The two colonies are in a perfect scenario i.e. the colonies are arranged in a grid, the town halls are in the center blocks of their respective chunks.
- A colony is 17 chunks by 17 chunks. 17 divided by 2 is 8.5. Based on our assumptions we can set a and b to be 8.5.
- 8.5^2 = 72.25. 72.75 * 2 = 144.5.
- The Square root of 144.5 is approximately 12.021.
- To get the number of blocks, we multiply that by 16, giving us 192.336.
- 192.336 * 2 = 384.672. Assumption: You know why I multiplied by 2.
- In a perfect system the minimum distance would need to be 385, but since the town hall can exist anywhere within the middle chunk we have to add 16, making the total maximum distance 401.
- QED
Actually, it should not be so complex, the moment it says "no close colony" is the moment you can place, but we can improve this wording a bit.