Allow max size of controller to be configurable (#126)

* modifiable max length of a controller in all 3 axis

* added a 1-255 range on the sizes

* fixed values to [1, 63]
This commit is contained in:
YoungOnion
2022-08-14 22:13:33 -06:00
committed by GitHub
parent 7996c44075
commit f434688f3a
2 changed files with 17 additions and 1 deletions
@@ -19,6 +19,7 @@
package appeng.me.pathfinding;
import appeng.core.AEConfig;
import net.minecraft.util.math.BlockPos;
import appeng.api.networking.IGridHost;
@@ -66,7 +67,7 @@ public class ControllerValidator implements IGridVisitor
this.minZ = Math.min( pos.getZ(), this.minZ );
this.maxZ = Math.max( pos.getZ(), this.maxZ );
if( this.maxX - this.minX < 7 && this.maxY - this.minY < 7 && this.maxZ - this.minZ < 7 )
if( this.maxX - this.minX < AEConfig.instance().getMaxControllerSizeX() && this.maxY - this.minY < AEConfig.instance().getMaxControllerSizeY() && this.maxZ - this.minZ < AEConfig.instance().getMaxControllerSizeZ() )
{
this.setFound( this.getFound() + 1 );
return true;