docs: private void DrawPrimitive( DrawLine l, World w ) throws Exception
      {
          // Set up the blocktype for the main blocks of the line:
          XMLBlockState blockType = new XMLBlockState(l.getType(), l.getColour(), l.getFace(), l.getVariant());
          if (!blockType.isValid())
              throw new Exception("Unrecognised block type: " + l.getType().value());
  
          // Set up the blocktype for the steps of the line, if one has been specified:
          XMLBlockState stepType = blockType;
          if (l.getSteptype() != null)
          {
              stepType = new XMLBlockState(l.getSteptype(), l.getColour(), l.getFace(), l.getVariant());
              if (!stepType.isValid())
                  throw new Exception("Unrecognised block type: " + l.getSteptype().value());
          }
  
          float dx = (l.getX2() - l.getX1());
          float dy = (l.getY2() - l.getY1());
          float dz = (l.getZ2() - l.getZ1());
          float steps = (int)Math.max(Math.max(Math.abs(dx), Math.abs(dy)), Math.abs(dz));
          if (steps < 1)
              steps = 1;
          dx /= steps;
          dy /= steps;
          dz /= steps;
  
          int prevY = l.getY1();
          int prevZ = l.getZ1();
          int prevX = l.getX1();
          for (int i = 0; i <= steps; i++)
          {
              int x = Math.round(l.getX1() + (float)i * dx);
              int y = Math.round(l.getY1() + (float)i * dy);
              int z = Math.round(l.getZ1() + (float)i * dz);
              BlockPos pos = new BlockPos(x, y, z);
              clearEntities(w, x, y, z, x + 1, y + 1, z + 1);
              setBlockState(w, pos, y == prevY ? blockType : stepType);
  
              // Ensure 4-connected:
              if (x != prevX && z != prevZ)
              {
                  pos = new BlockPos(x, y, prevZ);
                  clearEntities(w, x, y, prevZ, x + 1, y + 1, prevZ + 1);
                  setBlockState(w, pos, y == prevY ? blockType : stepType);
              }
              prevY = y;
              prevX = x;
              prevZ = z;
          }
      }