@@ -875,7 +875,7 @@ private void checkTasks(HighwayBuilderHIG b) {
875875 if (b .destroyCrystalTraps .get () && isCrystalTrap (b )) b .setState (DefuseCrystalTraps ); // Destroy crystal traps
876876 else if (needsToPlace (b , b .blockPosProvider .getLiquids (), true )) b .setState (FillLiquids ); // Fill Liquids
877877 else if (needsToMine (b , b .blockPosProvider .getFront (), true )) b .setState (MineFront ); // Mine Front
878- else if (b .floor .get () == HighwayBuilderHIG . Floor .Replace && needsToMine (b , b .blockPosProvider .getFloor (), false )) b .setState (MineFloor ); // Mine Floor
878+ else if (b .floor .get () == Floor .Replace && needsToMine (b , b .blockPosProvider .getFloor (), false )) b .setState (MineFloor ); // Mine Floor
879879 else if (b .railings .get () && needsToMine (b , b .blockPosProvider .getRailings (0 ), false )) b .setState (MineRailings ); // Mine Railings
880880 else if (b .mineAboveRailings .get () && needsToMine (b , b .blockPosProvider .getRailings (1 ), true )) b .setState (MineAboveRailings ); // Mine above railings
881881 else if (b .railings .get () && needsToPlace (b , b .blockPosProvider .getRailings (0 ), false )) {
@@ -1005,7 +1005,7 @@ protected void tick(HighwayBuilderHIG b) {
10051005 int slot = findBlocksToPlacePrioritizeTrash (b );
10061006 if (slot == -1 ) return ;
10071007
1008- place (b , new HighwayBuilderHIG . MBPIteratorFilter (b .blockPosProvider .getLiquids (), pos -> !pos .getState ().getFluidState ().isEmpty ()), slot , Forward );
1008+ place (b , new MBPIteratorFilter (b .blockPosProvider .getLiquids (), pos -> !pos .getState ().getFluidState ().isEmpty ()), slot , Forward );
10091009 }
10101010 },
10111011
@@ -1483,7 +1483,6 @@ else if (b.lastState == Center) {
14831483 return ;
14841484 }
14851485
1486- // todo when we add a digging only mode, make pickaxes fill all empty slots
14871486 minimumSlots = b .restockTask .materials ? restockSlots : 1 ;
14881487
14891488 HorizontalDirection dir = b .dir .diagonal ? b .dir .rotateLeft ().rotateLeftSkipOne () : b .dir .opposite ();
@@ -1727,7 +1726,7 @@ protected void tick(HighwayBuilderHIG b) {
17271726 int slot = findBlocksToPlacePrioritizeTrash (b );
17281727 if (slot == -1 ) return ;
17291728
1730- place (b , b .blockPosProvider .getBlockade (false , HighwayBuilderHIG . BlockadeType .Shulker ), slot , Restock );
1729+ place (b , b .blockPosProvider .getBlockade (false , BlockadeType .Shulker ), slot , Restock );
17311730 }
17321731 },
17331732
@@ -1892,7 +1891,6 @@ protected void mine(HighwayBuilderHIG b, HighwayBuilderHIG.MBPIterator it, boole
18921891 // extract all candidates for double mining and enqueue them to be mined. After those we can break the remaining
18931892 // blocks normally
18941893 if (b .doubleMine .get ()) {
1895-
18961894 ArrayDeque <BlockPos > toDoubleMine = new ArrayDeque <>();
18971895
18981896 it .save ();
@@ -1978,17 +1976,17 @@ private void doubleMine(HighwayBuilderHIG b, ArrayDeque<BlockPos> blocks) {
19781976 if (b .breakTimer > 0 ) return ;
19791977
19801978 if (b .normalMining == null ) {
1981- HighwayBuilderHIG . DoubleMineBlock block = new HighwayBuilderHIG . DoubleMineBlock (b , blocks .pop ());
1979+ DoubleMineBlock block = new DoubleMineBlock (b , blocks .pop ());
19821980 b .normalMining = block .startDestroying ();
19831981
19841982 b .breakTimer = b .breakDelay .get ();
19851983 if (b .breakTimer > 0 ) return ;
19861984 }
19871985
1988- if (HighwayBuilderHIG . DoubleMineBlock .rateLimited ) return ;
1986+ if (DoubleMineBlock .rateLimited ) return ;
19891987
19901988 if (b .packetMining == null && !blocks .isEmpty ()) {
1991- HighwayBuilderHIG . DoubleMineBlock block = new HighwayBuilderHIG . DoubleMineBlock (b , blocks .pop ());
1989+ DoubleMineBlock block = new DoubleMineBlock (b , blocks .pop ());
19921990
19931991 if (block != null ) {
19941992 b .packetMining = b .normalMining .packetMine ();
@@ -1999,7 +1997,7 @@ private void doubleMine(HighwayBuilderHIG b, ArrayDeque<BlockPos> blocks) {
19991997 }
20001998 }
20011999
2002- protected void place (HighwayBuilderHIG b , HighwayBuilderHIG . MBPIterator it , int slot , HighwayBuilderHIG . State nextState ) {
2000+ protected void place (HighwayBuilderHIG b , MBPIterator it , int slot , State nextState ) {
20032001 boolean placed = false ;
20042002 boolean finishedPlacing = false ;
20052003
@@ -2009,6 +2007,7 @@ protected void place(HighwayBuilderHIG b, HighwayBuilderHIG.MBPIterator it, int
20092007
20102008 if (pos .getBlockPos ().getSquaredDistance (b .mc .player .getEyePos ()) > b .placeRange .get () * b .placeRange .get ()) continue ;
20112009
2010+ // CheckEntities & SwapBack are disabled for waiting for better accuracy and speed of the builder
20122011 if (BlockUtils .place (pos .getBlockPos (), Hand .MAIN_HAND , slot , b .rotation .get ().place , 0 , true , false , false )) {
20132012 placed = true ;
20142013 b .blocksPlaced ++;
@@ -2070,11 +2069,6 @@ protected int findHotbarSlot(HighwayBuilderHIG b, boolean replaceTools) {
20702069
20712070 // No space found in hotbar
20722071 b .error ("No empty space in hotbar." );
2073- if (b .disconnectOnToggle .get ()) {
2074- b .mc .getNetworkHandler ().getConnection ().disconnect (Text .of ("No empty space in hotbar." ));
2075- b .displayInfo = false ;
2076- b .toggle ();
2077- }
20782072 return -1 ;
20792073 }
20802074
0 commit comments