about 1 month ago
Hey all! Some people have been having issues with Farm Limiter recently, so I went through and tried to learn as much as possible about it so I can explain it concisely. This will be accurate for the current version of farmlimiter (1419 with support for 1.15) and with our current settings as of December 27th, 2019. THE LISTED RULES WILL LIKELY BE UPDATED IN THE NEAR FUTURE.
What Is It:
A spigot plugin designed to reduce the number of mobs that are loaded at once.
How it Works:
It checks for mobs that are within a certain 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.
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.
How We Use It: THIS IS LIKELY TO CHANGE IN THE NEAR FUTURE
We limit mobs in 3 different groupings.
1) All mobs have a group size limit of 50 with a grouping distance of 120
2) Passive farm mobs (pig, cow, sheep, chickens) have a group size limit of 50 with a grouping distance of 5.
3) Standard Spawner Mobs (zombie, skele, spider, and cave spider) have a group size limit of 10 with a grouping distance of 0.5
What Do These Rules Mean:
1) All mobs have a hard limit of 50 within a certain area. This is checked for each mob type individually.
2) Since we have a the general limit, this actually doesn't do anything currently. Although I am likely going to request we change this in the future. Check back in like... a week
3) Every 3 minutes, standard spawners may have their kill chambers reduced some. I'll also be requesting changes to this to include all of our egg-based spawnables, and changing the number and radius,. Check back in a week-ish.
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. (IE: 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.
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).