Java Code Examples for thaumcraft.common.config.Config#golemDelay()
The following examples show how to use
thaumcraft.common.config.Config#golemDelay() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AIBreakBlock.java From Gadomancy with GNU Lesser General Public License v3.0 | 6 votes |
@Override public boolean shouldExecute() { if (golem.ticksExisted % Config.golemDelay > 0) { return false; } currentMarker = getNextMarker(); if(!hasValidTool()) { if(isInHomeRange()) { return true; } return false; } return currentMarker != null; }
Example 2
Source File: AIBreakBlock.java From Gadomancy with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean continueExecuting() { if(hasValidTool) { if(!hasBlock(currentMarker)) { return false; } if(distanceSquaredToGolem(currentMarker) < 1) { if(golem.getCarried() == null) { golem.startActionTimer(); } else { golem.startRightArmTimer(); } if(clickCount % (7 - Math.min(6, golem.getGolemStrength())) == 0) { doLeftClick(); } clickCount++; golem.getLookHelper().setLookPosition(currentMarker.x + 0.5D, currentMarker.y + 0.5D, currentMarker.z + 0.5D, 30.0F, 30.0F); count = 0; } else { if(count == 20) { count = 0; ForgeDirection dir = ForgeDirection.getOrientation(currentMarker.side); boolean path = golem.getNavigator().tryMoveToXYZ(currentMarker.x + 0.5D + dir.offsetX, currentMarker.y + 0.5D + dir.offsetY, currentMarker.z + 0.5D + dir.offsetZ, golem.getAIMoveSpeed()); if(!path) { if (blacklistCount > 10) { blacklist.put(currentMarker, golem.ticksExisted); return false; } blacklistCount++; } } count++; clickCount = 0; } } else { if(golem.ticksExisted % Config.golemDelay > 0) { if(isInHomeRange()) { IInventory homeChest = getHomeChest(); if(homeChest != null) { trySwitchTool(homeChest); } } else { return false; } } } return true; }