How-To: FarmLimiter - A Basic Guide


Awkwardbowman
Ancient

Joined: over 5 years ago
34 topics
149 posts

by Awkwardbowman » over 4 years ago

Introduction:
Hey all! This article is intended to help explain how the FarmLimiter plugin is used on the WilderCraft servers. This will be accurate for the current version of farmlimiter (1419 with support for 1.15) and with our current settings as of June 7th, 2020.


This is also used alongside of other plugins to assist with the server’s performance. The other most common plugin would be the Simple Anti-Mob Lag plugin. For information about that plugin, see this article.

What Is It: 
A spigot plugin designed to reduce the number of mobs that are loaded at once. It checks mobs and creates groupings of same-type mobs and removes mobs from groups above a certain size.


How it Works:
It checks for mobs that are within a certain euclidian distance same-type mobs and "groups" them. If that group exceeds a certain limit, it removes them until the remaining group is within that limit. While the rules may list multiple entities, each one is checked individually. (IE: Sheep are checked against sheep, and only against sheep. They would not have any impact on a group of nearby Cows.)


What are the Settings:
There are 3 settings of interest for each Rule.
1) What mobs does it affect?
2) What is the Distance for grouping?
3) What is the Group Size Limit?
This check is done every X number of seconds. Wildercraft has this set to 180 seconds (so every 3 minutes). Distance is very important to understand. Please see the further down the post for details and examples about the Distance setting.


[ Technical ] How We Use It: 
The rules affect 3 different groupings. Keep in mind that, while these are groups, the rules themselves will only apply to SINGLE mobs types at a time.

Rule Set 1: All mobs have a group limit of 50 with a grouping distance of 50.
Rule Set 2: Hostile Mobs that have spawn eggs available through votes/donations have a group limit of 25 with a grouping distance of 50.
Rule Set 3: Minecart and Minecart Variants have a group limit of 10 with a grouping distance of 1.


[ Non-Technical ] What Do These Rules Mean:
1) All mobs have a general limit where no more than 50 can be loaded at once in a given area. This is mainly expected to affect passive mob farms.

2) Any hostile mob that can be spawned from a spawner also has an additional limit of 25 for the area. This is to act as a safe-guard against spawners that are activated without the mobs being killed.  
3) Minecarts cannot be stacked more than 10 on top of each other. This means that minecart killing systems are not allowed. They’ve been seen to create more lag due to collision detection and increased natural mob spawning. Instead, please use other killing methods, such as magma blocks, wither roses, fall damage, and suffocation damage.

What Mobs are Removed:
Mobs are removed in the following order.
 1) Oldest entities without name tags
 2) Newest entities without a name tag
 3) Entities with a name tag


How the Distance Calculation works:
Farm limiter will look for a mob, and then find any mob of the same type within the provided distance and add it to the group. It will then repeat this for each mob that is added. Therefore, any same-type mob that is within distance of any member of the group will be checked and may be added. This will only be checked against loaded mobs (assume about 128 blocks away maximum). This does use vertical distance as well, using Euclidian geometry (aka "straight line distance").

Example: If you're using a range of 10, a zombie at (0,50,0) and a zombie at (0, 70, 0) would not be grouped together.

Let's do an example using an example rule.
Example Rule:Cows - Max Grouping 50 - Distance 16
Example Situation: If I have a group of 50 cows that are all within a few blocks of each other and centered at the coordinates (0,50,0). This will be counted as 1 group. Let's say there's another pen that also has 50 cows that are all within a few  blocks of each other, but that pen is centered at (0,50,30). That would be counted as a seperate group. If the closest locations of each pen are (0,50,2) and (0,50,28), then the two groups would never be directly joined to one another since they will always be at least 26 blocks apart and our rules uses a distance of 16.

Scenario 1: Now, let's say a naturally-generated cow spawns, and it walks to the coordinates (0,50,-10). This cow would be within 16 of the first group. When FarmLimiter runs its checks, it would see 51 cows grouped together, and it would remove 1, starting with the oldest.

Scenario 2: Now, let's say a naturally-generated cow spawns, and it walks to the coordinates (0,50,16). This cow would be within 16 of BOTH groups, effectively connecting them into a SINGLE GROUP. When FarmLimiter runs its checks, it would see ALL of the cows as a single group for a total of 101 grouped cows. 51 cows would then be removed, starting with the oldest.


Conclusion:
If you are concerned about your mobs and groupings, ask a Mod to check. They can help identify the location and proximity of any loaded groups. Be aware there is no gaurentee that staff can prepare for all scenarios, so be careful in picking the locations of any large entity-based farms. 

Hope this helped. If you have any questions or see any discrepancies, please contact Awkwardbowman (or whoever the current Tech Mod is).

 




Last edited: over 3 years ago diamond.png x 1


Want to Reply?

Join our friendly community to get access to your profile page, apply for staff, and post a reply here!

Login or Register Account