@Override
  public void readjustSpeed(TravelingItem item) {
    if (item.getSpeed() > Utils.pipeNormalSpeed) {
      item.setSpeed(item.getSpeed() - Utils.pipeNormalSpeed / 2.0F);
    }

    if (item.getSpeed() < Utils.pipeNormalSpeed) {
      item.setSpeed(Utils.pipeNormalSpeed);
    }
  }
  public void doRenderItem(
      TravelingItem travellingItem, double x, double y, double z, float light, EnumColor color) {

    if (travellingItem == null || travellingItem.getItemStack() == null) return;

    float renderScale = 0.7f;
    ItemStack itemstack = travellingItem.getItemStack();
    GL11.glPushMatrix();
    GL11.glTranslatef((float) x, (float) y, (float) z);
    GL11.glTranslatef(0, 0.25F, 0);
    GL11.glScalef(renderScale, renderScale, renderScale);
    dummyEntityItem.setEntityItemStack(itemstack);
    customRenderItem.doRenderItem(dummyEntityItem, 0, 0, 0, 0, 0);
    if (color != null) {
      func_110628_a(TextureMap.field_110575_b);
      BlockInterface block = new BlockInterface();

      block.texture = PipeIconProvider.TYPE.ItemBox.getIcon();

      float pix = 0.0625F;

      float min = -4 * pix;
      float max = 4 * pix;

      block.minY = min;
      block.maxY = max;

      block.minZ = min;
      block.maxZ = max;

      block.minX = min;
      block.maxX = max;

      int cHex = color.getLightHex();
      float r = (float) (cHex >> 16 & 0xff) / 255F;
      float g = (float) (cHex >> 8 & 0xff) / 255F;
      float b = (float) (cHex & 0xff) / 255F;
      GL11.glColor4f(r, g, b, 1.0F);
      RenderEntityBlock.INSTANCE.renderBlock(block, null, 0, 0, 0, false, true);
    }
    GL11.glPopMatrix();
  }
 private void color(TravelingItem item) {
   if ((item.toCenter && item.input.getOpposite() == side)
       || (!item.toCenter && item.output == side)) {
     item.color = EnumColor.fromId(color);
   }
 }