public void tickClientForward(DuctUnitItem homeTile) { progress += step; if (progress >= homeTile.getDuctLength()) { progress %= homeTile.getDuctLength(); if (shouldDie) { homeTile.removeItem(this, true); } else { homeTile.removeItem(this, false); shouldDie = true; TileEntity newTile = BlockHelper.getAdjacentTileEntity(homeTile.parent, direction); if (newTile instanceof IDuctHolder) { DuctUnitItem itemDuct = ((IDuctHolder) newTile).getDuct(DuctToken.ITEMS); if (itemDuct != null) { oldDirection = direction; itemDuct.myItems.add(this); if (!TickHandlerClient.tickBlocks.contains(itemDuct) && !TickHandlerClient.tickBlocksToAdd.contains(itemDuct)) { TickHandlerClient.tickBlocksToAdd.add(itemDuct); } } } } } }
if (newHome != null) { if (newHome.ductCache[direction ^ 1] != null) { homeTile.removeItem(this, false); newHome.transferItem(this); if (myPath.hasNextDirection()) { return; homeTile.removeItem(this, true); } else if (homeTile.isInput(direction) && goingToStuff) { if (homeTile.canStuffItem()) { goingToStuff = false; homeTile.stuffItem(this); homeTile.removeItem(this, true); } else { goingToStuff = false;
if (d == direction) { homeTile.stuffItem(this); homeTile.removeItem(this, true); } else { myPath = new Route(homeTile); } else if (homeTile.ticksExisted == DuctUnitItem.MAX_TICKS_EXISTED_BEFORE_DUMP) { CoreUtils.dropItemStackIntoWorld(stack, homeTile.world(), new Vec3d(homeTile.pos())); homeTile.removeItem(this, true);