Allows server operators to configure the distance a banner can (or must) be placed from a town to begin a siege.
The intention of this is to encourage more open battlefields (where the banner is decently far from the town) where players will fight over a larger area and make the banner harder to capture (ideally) - Working well with the banner capture radius PR previously merged.
There are some possible issues;
SiegeWarBlockUtil#getSurrounding (new methods) use a townblock radius - this is documented on the parameters but could be confusing as this util generally seems to focus on actual blocks
Does not add any support for multiple towns being possible siege targets - It continues the current SiegeWar logic of "use the first in the list" - With the larger pool of townblocks this is much less reliable, I do plan to make a PR for this seperately at a later point.
Config suggests not setting the maximum above '3' blocks - This is as it has to check every townblock in a radius, this is 48 checks instead of the standard 4/8 for SiegeWar - unlikely to be an issue but above '3' is likely to be a problem anyway.
Blocks sieges if any townblocks are in the "minimum"/excluded radius of the banner, not just the target town, this is intentional behaviour and again, I plan to potentially add a config for this in multiple targets PR as they would be ideal together.
Minimum number of town blocks banner must be placed at (exclusive, e.g 1 means it must be in the second chunk)
These config options do respect the current "banner at border" config and will simply be ignored, this is documented in the comments.
Relevant Issue ticket:
N/A
[X] I have tested this pull request for defects on a server.
Tested on Paper 1.20.4 with OpenJDK Java 17
Compiles against Java 1.8 but unable to test on 1.16.5 due to missing classes in Towny (unrelated to SiegeWar plugin)
By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the SiegeWar License for perpetuity.
Description:
Allows server operators to configure the distance a banner can (or must) be placed from a town to begin a siege.
The intention of this is to encourage more open battlefields (where the banner is decently far from the town) where players will fight over a larger area and make the banner harder to capture (ideally) - Working well with the banner capture radius PR previously merged.
There are some possible issues;
New Nodes/Commands/ConfigOptions:
war.siege.distances.banner_place_distance_town_blocks.max
default:1
war.siege.distances.banner_place_distance_town_blocks.min
default:0
These config options do respect the current "banner at border" config and will simply be ignored, this is documented in the comments.
Relevant Issue ticket:
N/A
Tested on Paper 1.20.4 with OpenJDK Java 17 Compiles against Java 1.8 but unable to test on 1.16.5 due to missing classes in Towny (unrelated to SiegeWar plugin)
By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the SiegeWar License for perpetuity.