Remake of radius claim method. It now starts in the current chunk and spirals outward, in a repeating task designed to keep from overloading the server. The old method tried to put together a list of chunks, and then tried to claim them immediately starting from one corner of the overall area.
New setting "radiusClaimFailureLimit" (default 9). If claims are unsuccessful that many times in a row during a radius claim, the task will cancel out. There is no longer a limit to the specified radius since the process should no longer cause major server stress, and due to the process canceling out after several failures as just described. Added some new methods to FLocation to quickly convert between block/chunk/region positions, and rewrote the FLocation hashCode() method to make it faster.
This commit is contained in:
@@ -648,12 +648,10 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
||||
{
|
||||
Faction faction = this.getFaction();
|
||||
if ( ! Econ.modifyMoney(faction, -cost, "to claim this land", "for claiming this land")) return false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! Econ.modifyMoney(this, -cost, "to claim this land", "for claiming this land")) return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user