Buggy code:
public class PlanCraftRecipe extends PlanPiece { private ItemStack itemToCraft ; private int amountToCraft = 1 ; public PlanCraftRecipe . State state = PlanCraftRecipe . State . PATHING ; public int width = - 1 ; public int height = - 1 ; public List < ItemStack > listRecipeShape = null ; public static int sizeCraftGrid = 9 ; public static int sizeInventoryMain = 27 ; public static int sizeInventoryHotbar = 9 ; public static int slotCraftOut = 0 ; public static int slotCraftMatrixStart = 1 ; public static int slotInventoryMainStart = 1 + ( PlanCraftRecipe . sizeCraftGrid ) ; public static int slotInventoryHotbarStart = ( PlanCraftRecipe . slotInventoryMainStart ) + ( PlanCraftRecipe . sizeInventoryMain ) ; public int amountItCanProvide = 64 ; public int guiWait = 0 ; public int guiWaitAmount = 10 ; public enum State { PATHING , WAITING_ON_GUI , GUI_OPEN ; } public PlanCraftRecipe ( String planName , Blackboard blackboard , IRecipe recipe , List < ItemStack > recipeNeeds , int width , int height ) { } public PlanCraftRecipe ( PlanPiece obj ) { } @ Override public void initTask ( PlanPiece piece , IWorldStateProperty effectRequirement , IWorldStateProperty preconditionRequirement ) { } public int getAmountToCraft ( ) { } public void setAmountToCraft ( int amountToCraft ) { } public ItemStack getItemToCraft ( ) { } public void setItemToCraft ( ItemStack itemToCraft ) { } @ Override public EnumBehaviorState tick ( ) { if ( isTaskComplete ( ) ) { return EnumBehaviorState . SUCCESS ; } AIBTAgent agent = Corobot . getPlayerAI ( ) . agent ; IWorld world = Corobot . getPlayerAI ( ) . bridgeWorld ; IEntity player = Corobot . getPlayerAI ( ) ; EntityPlayer playerEnt = Corobot . getPlayerAI ( ) . bridgePlayer . getPlayer ( ) ; BlockLocation loc = UtilMemory . getClosestBlockFromMemory ( crafting_table , ( - 1 ) ) ; if ( loc != null ) { double dist = VecUtil . getDistSqrd ( player . getPos ( ) , loc . getPos ( ) ) ; if ( dist < 3 ) { World worldMC = Minecraft . getMinecraft ( ) . theWorld ; int x = MathHelper . floor_double ( loc . getPos ( ) . x ) ; int y = MathHelper . floor_double ( loc . getPos ( ) . y ) ; int z = MathHelper . floor_double ( loc . getPos ( ) . z ) ; Block block = worldMC . getBlock ( x , y , z ) ; if ( ( playerEnt . openContainer ) instanceof ContainerWorkbench ) { System . out . println ( "slot<seq2seq4repair_space>click" ) ; if ( ( guiWait ) > 0 ) { ( guiWait ) -- ; return EnumBehaviorState . RUNNING ; } if ( ( itemToCraft . getItem ( ) ) == ( Items . wooden_hoe ) ) { int test = 0 ; } for ( int i = 0 ; i < ( listRecipeShape . size ( ) ) ; i ++ ) { ItemStack stack = listRecipeShape . get ( i ) ; if ( stack != null ) { int clickFrom = PlanCraftRecipe . getFirstSlotContainingItem ( playerEnt . openContainer , stack , PlanCraftRecipe . slotInventoryMainStart , ( ( PlanCraftRecipe . slotInventoryHotbarStart ) + ( PlanCraftRecipe . sizeInventoryHotbar ) ) ) ; System . out . println ( ( "clickFrom:<seq2seq4repair_space>" + clickFrom ) ) ; if ( clickFrom != ( - 1 ) ) { int clickTo = PlanCraftRecipe . slotCraftMatrixStart ; if ( ( width ) == ( - 1 ) ) { clickTo = i ; System . out . println ( ( "clickTo<seq2seq4repair_space>shapeless:<seq2seq4repair_space>" + clickTo ) ) ; } else { int iOffset = i ; int xx = ( iOffset % ( width ) ) + 1 ; int yy = ( ( int ) ( iOffset // ( width ) ) ) ; System . out . println ( ( ( ( "xx//yy:<seq2seq4repair_space>" + xx ) + "//" ) + yy ) ) ; clickTo = ( yy * 3 ) + xx ; System . out . println ( ( "clickTo:<seq2seq4repair_space>" + clickTo ) ) ; System . out . println ( "durr" ) ; } UtilContainer . clickSlot ( clickFrom , mouseLeftClick , mouse2StepClick ) ; UtilContainer . clickSlot ( clickTo , mouseRightClick , mouse2StepClick ) ; UtilContainer . clickSlot ( clickFrom , mouseLeftClick , mouse2StepClick ) ; } else { System . out . println ( ( ( "CRITICAL!<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>item<seq2seq4repair_space>" + stack ) + ",<seq2seq4repair_space>did<seq2seq4repair_space>something<seq2seq4repair_space>remove<seq2seq4repair_space>it<seq2seq4repair_space>since<seq2seq4repair_space>plan<seq2seq4repair_space>was<seq2seq4repair_space>made?" ) ) ; return EnumBehaviorState . FAILURE ; } } } UtilContainer . clickSlot ( PlanCraftRecipe . slotCraftOut , mouseLeftClick , mouseShiftClick ) ; System . out . println ( "slot<seq2seq4repair_space>click<seq2seq4repair_space>complete" ) ; return EnumBehaviorState . SUCCESS ; } else { <START_BUG> System . out . println ( "open<seq2seq4repair_space>gui" ) ; <END_BUG> UtilContainer . openContainer ( x , y , z ) ; guiWait = guiWaitAmount ; } } else { state = PlanCraftRecipe . State . PATHING ; if ( ( ( world . getTicksTotal ( ) ) % 40 ) == 0 ) { getBlackboard ( ) . setMoveToBest ( loc . getPos ( ) ) ; } } } else { System . out . println ( "cant<seq2seq4repair_space>find<seq2seq4repair_space>crafting<seq2seq4repair_space>table" ) ; return EnumBehaviorState . FAILURE ; } if ( isTaskComplete ( ) ) { return EnumBehaviorState . SUCCESS ; } else { return EnumBehaviorState . RUNNING ; } } public boolean isTaskComplete ( ) { } public static int getFirstSlotContainingItem ( Container container , ItemStack itemStack , int findStart , int findEnd ) { } @ Override public boolean canPlanBeUsedMultipleTimes ( ) { } @ Override public void reset ( ) { } }

Fix:
System . out . println ( "open<seq2seq4repair_space>gui<seq2seq4repair_space>crafting" ) ;